Is there a way to use debug on Jasmine Headless webkit?
Maybe something like
describe "Some Test", ->
it "should break on debugger", ->
console.log("before debugger")
debugger
console.log("after debugger")
and have similar effect as debugger on Ruby?
As mentioned here, you can use the runner-out flag to generate a nice report with a backtrace for any failures. It's not interactive like debugger, but it is quite nice.
jasmine-headless-webkit --runner-out tmp/jhw-out.html
Note: you can also set this flag in the .jasmine-headless-webkit file of your project or home directory, particularly useful if you're using Guard.
Related
We want our continuous integration scripts to run our apps on the test environments with MSVC attached to the apps.
I've tried several options like this or this that launch vsjitdebugger.exe but it pops several pop-ups like "Do you really want to start debgging? Yes. Cancel debugging" and "Choose the debugger"( with only one choice in the list). That is unacceptable because ... it is supposed to be automated - to work without humans.
Anyone done that and knows how to truly automate it?
It will have the JIT debugging pop windows during using command line or IDE if we enable JIT debugging to capture the Exception, I often use the following sample as the debugging tool even if it doesn't really meet your requirement:
https://www.codeproject.com/articles/1090417/how-to-set-debugger-to-auto-attach-on-process-star
We could disable JIT without pop window, but it means that it will not really call it:
https://msdn.microsoft.com/en-us/library/5hs4b7a6(v=vs.140).aspx
No other good workaround for it, but I will help you submit a feature request to the product team:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/17280578-launching-msvc-debugger-to-debug-an-app-from-comma
You could add your comment and vote it:)
Using Firebug, I can manually enter a javascript statement and the debugger will execute it. I can't find where/how to do so with Firefox debugger.
Can it be done?
(Sick and tired for Firebug quality going down the tubes. Used to be the best debugger out there and it's a pile of crap now).
Apparently, you type in commands in the console and if a javascript statement it will execute it.
About as intuitive as a football bat.
I use PhpStorm for a while now, and it's code inspection and syntax highlighting is great! To further extend this feature, I am looking for a way to alert myself of 'debug functions'. I frequently use functions like var_dump(), exit() or echo '<pre>',print($var),'</pre>'. Unfortunately, I also frequently forget these when deploying some code.
Is it possible to add custom highlighting in PhpStorm for some defined functions with the Inspection-feature, so I am visually notified that some debugging-code is still present? Or a plugin or other feature to accomplish something like that?
Install and use Php Inspections (EA Extended) plugin
Once installed -- Settings/Preferences | Editor | Inspections
One of the inspections this plugin provides called Forgotten debug statements -- find it there (hint: there is a search field -- use it)
This inspection will highlight some standard debug related functions + you can add your own function names.
P.S.
This inspection works with PHP functions only -- it will not find constructions like echo '<pre>',print($var),'</pre>'.
BTW -- why don't you try Xdebug/Zend Debugger for a proper debug experience?
I have a series of Google Unit Tests that are launched via a bat file. Some of these tests are broken and a window appears when they run:
Microsoft Visual C++ Debug Library
Debug Error!
... Info about error
This window waits for a user to press Abort, Retry, Ignore. Of course, this halts my test. Currently, I delete the broken tests before I run the batch. I want a way to force this window to abort or ignore - so I don't need to skip the broken tests.
This problem is similar to; however, I cannot write to reg keys
How do I disable the 'Debug / Close Application' dialog on Windows Vista?
Update: My manager says this window might not appear if this project was in release. Trying to do that now. However, if there is a solution besides changing my project to release, I would appreciate it! :D
That's what you get from a failed assert() in the source code. Useful to debug the test. But actually running unit tests against code that was compiled in the Debug configuration is not useful. Your customer isn't going to run the Debug build either.
Only test the Release build, that disables those assert() calls as well.
I'm using Aptana Studio with Pydev 1.5.3 to debug my Django applications. I use PyDev's remote debugger and some code in manage.py and for most of the time this setup is working successfully- I can set breakpoints, inspect variables and step/continue through my code.
However, I'd like to execute arbitrary code at the breakpoint- the thing I really miss after switching from pdb to Eclipse debugging. There is an interactive console available in debug perspective but it is inactive for me.
So my question- is it possible to set up an interactive console in PyDev with remote debugger which could "inject" code at breakpoint?
strange, i am using pydev 1.5.6 for remote debugging and I can use the interactive console - i type the cmmand, hit enter, after a while get results back; check your firewall is not blocking anything (if you are sure, the interactive console works in local mode). there is even settings in pydev source code to set how much of stdout should be returned back to client (in chars), it should work
After some digging I discovered that I can use Expressions view to access variables properties and view results of class methods, but that still isn't a complete console at breakpoint though.
With PyDev 1.5.5 it should be possible:
In "Variables" view, you can right-click on a name, then select "change value".
The console is working as well, albeit a bit tricky.
It is only for inspection and in a very strange way: you have to input the text in the "Debug server" console, and you will get the output in the "filename" console.
Note also that you need to press enter twice, leaving an empty line.
While the "empty line" trick is documented, the issue about two different console for input and output is not, and I think it may be a bug.
On my development stack running Apache + mod_wsgi entering commands into the console had their output routed to the site's error logs. To resolve this you have set the stdoutToServer=True and sterrToServer=True to route capture all output to the PyDev remote debugger:
from pydevsrc import pydevd;pydevd.settrace('192.168.2.8', stdoutToServer=True, stderrToServer=True) #clone and put on python path: https://github.com/tenXer/PyDevSrc