How can I debug a failing Karma test?
I am running mocha+chai+sinon tests without a problem. If I try to run the tests with Karma I get a "Uncaught TypeError: Cannot read property 'call' of undefined" error and Karma stops running (I am using Webpack to transpile). The error seems to be with a Webpack loader, but the question is how to I debug this? As soon as I run the tests, karma fails and terminates.
How can I trace the karma execution?
You can configure karma to stay alive in the background. Just add the option singleRun: false to your karma config. If you're using grunt-karma, you can also additionally set the background: true option.
If you then start karma, the window which opens up should stay open. There should be a debug link which will open a second window. This window will stay open and you'll be able to re-run all the tests by just pressing F5 / refresh. Inside that window you can debug the whole stuff using the dev tools (usually opened by pressing F12) of your choice.
Related
We have a new team member trying to get started with our Godot project. VSCode is our standard editor. Everyone is using Fedora Linux. You can find the relevant files here:
https://github.com/redhat-gamedev/srt-godot-server/tree/main/.vscode
On my machine, when trying to run the launch configuration, the build task succeeds, and then the program is launched. Everything works fine.
On the new team member's machine, when trying to run the launch configuration, the build task succeeds, and then nothing happens. There are no errors. There is no output.
We tried running VSCode with an increased log level (debug), but the VScode log files don't show anything meaningful or related. We tried executing the equivalent launch command from the terminal/shell and it works fine. There are no errors, but the resulting built program executes successfully. Interestingly, running code --verbose does produce a ton of output but nothing super specific to the execution of the steps in the launch configuration. Also, code --verbose --log debug does not cause messages spit out of VSCode to be at the DEBUG log level. Everything is still INFO:
[4183395:0112/092541.932947:INFO:CONSOLE(616)] "%cTRACE color: #888 [File Watcher (parcel)] [CHANGED] ...
How can I debug a launch configuration in VSCode to see what's going on? Is there a way to make the launch configuration system of VSCode be more verbose?
Ufter updating debugger doesn't work. When I click RUN AND DEBUG nothing is happening. And I can't run the program in the debug console.
Previously I just clicked RUN AND DEBUG and ran the program by writing "node nameOfTheProgram.js" in debug console and it was working. How can I fix it?
errors from debug console
I'm using playwright and vscode, especially the "debug test" function which pops up a real browser window to run the test. When it fails the test auto closes, how can I make it not auto close so that I can modify the test and also visually see what the state of the test is?
When it comes to starting debug mode while deploying my app to my device in AndroidStudio the debug button is green and clickable:
If I however want to start debug mode for my tests it is greyed out:
Is there a way for me to enter debug mode to better understand why my tests fail?
It turns out that Debug mode is available when Debugging individual files but not when Debugging folders/All tests.
This means it requires adding a new run configuration (via edit configuration):
Click new configuration:
Select Flutter Test and end up at:
You need the Test scope All in file and can select the testfile that you want to debug and use the debugger with it.
His,
I have been trying to find out why starting DevMode with Debugger from Eclipse was so slow and noticed in the list of processes on my machine the following line:
/usr/lib/jvm/jdk1.6.0_14/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:47248 ...
Apparently the application is suspended to wait until the debugger is connected which takes about 2 minutes. I would like to set "suspend=n". Does anyone know where I could set this directive. The vm section in Eclipse launch configuration is empty and if I paste the updated debugger config there is a error telling that the values are entered twice.
As I understand it, Eclipse takes this config from somewhere and inserts it automatically when I run launch configurations in debugger mode.
Thanks
You can't remove that parameter and, if you could, it wouldn't make a difference. When you connect a new browser to the GWT OOPHM instance it has to compile the entire project for use in development mode. This is what takes time, not waiting for the debugger to attach.