I'm new to VS Code, and is following the official tutorial to learn how to debug. However, it just won't work. First, the UI looks different. It shows "RUN".
Compared to what the UI looks like in the video, which shows "DEBUG".
Also, I added a breakpoint and hit the green start button, it just never stops.
Here's the launch.json file:
What should I do to make the debugger work?
You need to run node in inspect mode.
In terminal / console, do:
node --inspect app.js
Related
When I attach to my proccess via vscode debug It just stuck and I can not to terminate it, can not to reload it / pause / stop, everything. The breakpoints is not working, the debug will not stop on a breakpoint when should...
I can't start another debug process, can't attach to another one. It's just stuck and I have only one option - close vsCode
The problem is only with attach proccess in debug. Everything else working fine...
Buttons aren't working, nothing happens while I turn off vsCode completely
Tried to change variables in launch.json etc. Nothing changes
All worked fine in evening last month, next day the debugger is dead like that.
My launch.json setting for attaching
My terminal in VS Code has since the previous update shown the word ERROR on every single line. I have installed oh-my-posh a little while back to make the terminal more pleasant to look at and give me some basic information.
Does anyone know where to look, to find the source of the error message? Tyvm :)
Update
Noticed something different when running echo $ as suggested by #kamen-minkov
When I booted Ubuntu up again and my VS Code opened from the previous state it was in the ERROR label was gone:
However. When I opened up a new tab it returned:
The only difference I can notice between the two is that there is a little, unfilled, circle/dot on the left side of the newly opened tab and not the one that opened up with VS Code. Is it some sort of debugger marking or something else? Could it be the source of the problem?
Apparently it's the Shell Integration decorations that's causing the hazards..
// settings.json
"terminal.integrated.shellIntegration.enabled": false,
"terminal.integrated.shellIntegration.decorationsEnabled": "never",
disable these settings and oh-my-posh error label will be gone :)
I've created a basic node app following the steps described here - https://code.visualstudio.com/Docs/nodejs
Every time I run/debug (hit F5), VSCode automatically breaks at line 2 of this auto created debug file. The weird part is there is no breakpoint set.
I can continue past this and everything runs a-okay after, but it's super annoying to stop here every single time
Any ideas on getting rid of this? I've poured through the settings and nothing obvious stands out.
There is an option in the launch.json file called "stopOnEntry" (You can access the file by hitting the Configure icon on the Debug panel). Set it to false and it should solve your problem.
I have problem with debugging js code written in js bin with chrome.
Everytime when i edit/click run with JS new source file is generated and old breakpoint are not being hit.
Do you have any solution for this problem?
Just use a debugger statement in your code. Even though jsbin will give you a warning and won't autorun, you can still click the run button (or press ⌃⏎) and your code will pause on the debugger statement.
You can also look on the Sources tab for an item called (no domain). The file inside it has your JS and you can set breakpoints.
It is under runner - JS Bin Output - (no domain) - leduzidigo.js
I am developing using the PyDev plugin in Eclipse. My program uses several classes in several files. I usually run the program using the green "play" icon or using Control+F11. The only problem is that it will run the file, which is currently in "focus". Usually this is not the one containing the starting point of my application. As I run my program something like 200 times a day, this means that I need 200 extra click on the mouse and often forget about this.
Is there any way of setting the default file to launch?
Yes, change the launching to rerun the last launched, so Ctrl+F11 will launch the last one -- and use F9 to launch the one with focus -- See instructions and details at: http://pydev.org/manual_101_run.html
For me, the shortcut is Ctrl+Shift+F9. I don't think I've changed any keybindings, so its strange that it would be different from the official documentation.
Go to Run->Run History, and select the run that is your 'main' run. Now you should be able to use Ctrl-Shift+F9 from any other file to rerun your main. If it isn't Ctrl+Shift+F9 for you, look on the console window that should be at the bottom of your screen showing the stdout after every run. There is an icon on the top of it that has the green start arrow with a yellow arrow underneath it pointing to the right. That is the command to relaunch with the same configuration. If you hover over that, it should tell you the keyboard shortcut you need.