Debugging Uncaught Exceptions or All Exceptions in Visual Studio Code - visual-studio-code

You can clearly see in the picture here that you used to be able to break on all or uncaught exceptions in vscode:
https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome
On the current version of vscode and this plugin (vscode 1.1.1, chrome-debug 0.3.1) those checkboxes seem to be gone from the Breakpoints section of the debug window.
Was that feature moved, or is it not available anymore?

Related

VS Code Error vs Visual Studio 2019 Error

I Used VS code to write some code but the compiler is working only in the terminal. So I set up Visual Studio 2019 For C++ but get an error that I didn't get in VS Code. (I know the solution to the error):
The uninitialized local variable 'name' used
and the solution is Just adding these {} brackets to the variable.
Why is This Happening in Visual Studio 2019 and not in VS Code?
Note: I Installed "MinGW" for VS Code and desktop development with C++ for Visual Studio 2019.
Additional: I Want Visual Studio 2019 to Show unused scopes (#Include things) and help me to clean code.
Check your exception settings in Visual Studio (Ctrl + Alt + E) and/or your Warning Level on the Project file (right click on project in solution explorer, click Properties, C/C++ > General > Warning Level).
The warning/exception controls in Visual Studio are rather detailed.
The "warning that is now an error" issue related to The uninitialized local variable 'name' used simply comes down to the out-of-the-box settings in Visual Studio. You can change them if you'd like. Technically, your code will compile under every C++ compiler I'm aware of, but has a greater likelihood of crashing.
As for whether it should be a warning or an error, that is more opinion than fact. My opinion is that it should be an error, because such situations can lead to very sneaky program crashes, but there is no hard-and-fast rule.

Stop Visual Studio Code from opening files on exception

While debugging a Flutter app, Visual Studio Code opens up files where exceptions happen even if I uncheck breakpoints for "All Exceptions" and "Uncaught Exceptions" in the debug pane. I even removed all breakpoints. Is there a way to disable this?
I couldn't find anything in settings. It's super frustrating to be editing a file and all of a sudden another file pops up and now I'm inadvertently editing some Dart system library.
A few files I've seen opened by the editor are binding.dart, view.dart, clip.dart, and sha256.dart, off the top of my head.

How to show all (-Wall) warnings in VSCode

I am using Visual Studio Code with the C/C++ extension. IntelliSense shows some errors but definitely not all of them, I tried settings the following setting:
"C_Cpp.default.compilerArgs": ["${default}", "-Wall"]
But is has no effect. The only thing that's some improvement is adding a build task: when I run it the warnings and errors it generates are displayed inline in VSCode. This workaround is still suboptimal: I need to build to get the errors while I would like to get as soon as I finish typing them (like it already is the case for other errors both in VSCode and other editors I know).
How can I fix this issue ?

Visual Studio Code - Javascript Errors Do Not Show File and Line

I am new to Visual Studio Code.
An error occurred in my javascript. In the console it said:
Uncaught TypeError: Cannot read property 'id' of undefined
But had underneath:
No debugger available, can not send 'variables'
I have Chrome Debugger installed in Visual Studio Code.
However, when I go the the Chrome Browser, when the program is running, and I look at the Console in the Developer Tools, it tells me the File and line number where the nefarious error occurred.
Why is it not showing this in Visual Studio Code?
How can I get it to show it in Visual Studio Code?

Unity Debug/Error No longer Says Line in Source Code

Ever since I upgraded my project and version of Unity from 5.6.0 to 5.6.1 the file and line in which the debug message or error occurred would not show up. This included double clicking the message, which wouldn't take me to the location of the error either.
After suffering for weeks I found the answer to this problem while writing this post. The solution is to expand the top right menu of the console tab, Stack Trace Logging > All and choose ScriptOnly. This works for Visual Studio 17 and MonoDevelop.