Is there any way to dump dissasembly of genrated code for each ion (LIR) instruction.
Something similar --print-opt-code --code-comments in v8?
IONFLAGS=codegen js --ion-offthread-compile=off app.js
You need debug build of spidermonkey. After running this you'll have code generator log in stderr.
In order to find specific function search log for "Emitting code for script".
Related
I would like to know if I can call the minify main function programmatically.
I am able to run the same code as defined in compress, however replacing UglifyJS.Compressor with UglifyJS.minify does not work.
This is because I would like to pass the same options defined in the README of UglifyJS2, instead of the ones in compress.
Please note that I am running the code in Nashorn, and not in Node.js so that would be similar to a browser environment.
This is a work in progress: see this issue and this PR.
I'm am trying to run a debug() method but I get the following error when I try to compile the code
Call to a possibly undefined method debug. debug("...");
I assume all I need to do is add an import ... where ... has the debug method defined. However I have tried looking for it and cannot find it.
I can't find what file to import. This is a large project that I got handed down to me to implement small features. I can add debug("msg") into some files with issue but others give me the error msg aboe.
I can't see trace("...") in the debug log.
Since there is no debug function this was obviously a custom function someone wrote. Nobody here can tell you where to find the file to import, you'll need to get more information from whoever you inherited the files from.
Another option is to just comment out the debug calls since based on the name they probably aren't doing anything but giving debugging information which most likely isn't required for the end goal of the program.
I'm using VS2013/CodedUI and my palybacksetting is as follow:
Playback.PlaybackSettings.LoggerOverrideState = HtmlLoggerState.AllActionSnapshot;
I also have a 3rd party tool that I have integrated to my code that does some action that codedui can't...Iw an to be able to log those steps into the ActionLog.html file with where codedui capture the actions and screenshot.
I searched a lot but didn't find anything on how we can achieve this.
thanks in advance for any help
I posted a response over here: Writing Custom HTML Logs
It sounds like there's not a good way to do this. You can get the path to where the html file lives and write a custom logger from there. I'm not sure it'd be safe to try and write to it while your test is executing, but perhaps once your test is complete.
I am using guard-jasmine create coverage reports for my javascript app written with backbone js. I would like to exclude the template files from being included in the coverage. Is there a way to do this currently? I have also tried looking through the source and passing the -x option to the intrument command in the coverage.rb file but that doesn't seem to help at all. Any pointers would be appreciated.
Thanks!
There is currently no way of configuring Guard::Jasmine to skip specific files from generating the coverage.
A possible way to add this would be to add something like a coverage_skip option that contains a regex to check it as a preconodition in the coverage tilt template:
return data if file =~ ENV['COVERAGE_SKIP']
Since we do not have access to the Guard::Jasmine options, we need to set it as an environment variable in the server process.
A pull request is heartly welcome ;)
I'm trying to debug a custom javascript for Thunderbird that is defined in userChrome.js. Unfortunately I did not find a decent way to log to the javascript console. Is there an easy way to dump some information to an easily accessible console/logfile so that I can debug my script? I have consoleĀ² installed and tried calling
throw Error("foobar");
already, without success.
Does Application.console.log("message") work?
Write console.log("hello"); in your *.uc.js file.
Open browser console(ctrl + shift + j).
Now, you can see message from file *.uc.js.