I'm using AWS Lambda node 8.10, babel with in-line source-maps, and the latest VSCode (inspector protocol). When I start the debugger VSCode breaks at the entry point to of my lambda but won't stop at any subsequent breakpoints; the play button just moves past the entry point and the function runs to completion. If I check the "All Exceptions" check box it stops at other places in the code where excepting occur but still not my breakpoints.
Any idea how to make it stop at my breakpoints.
To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.
If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.
If a breakpoint is reached, or a signal not related to stepping occurs before count steps, stepping stops right away. Continue to the next source line in the current (innermost) stack frame. This is similar to step , but function calls that appear within the line of code are executed without stopping.
This article helps you resolve a problem where the debugger doesn't stop on breakpoints when you debug ASP.NET applications in Microsoft Visual Studio .NET. When you debug ASP.NET applications in Visual Studio .NET, the debugger might not stop on breakpoints. This problem occurs because ASP.NET debugging isn't enabled on the application.
Breakpoints can be toggled by clicking on the editor margin or using F9 on the current line. Finer breakpoint control (enable/disable/reapply) can be done in the Debug view's BREAKPOINTS section. Breakpoints in the editor margin are normally shown as red filled circles.
There are no apparent errors – the code simply executes all the way through without ever stopping on the breakpoint. Both Visual Studio and the application you’re debugging need to be running with the same level of elevation.
VS Code debuggers typically support launching a program in debug mode or attaching to an already running program in debug mode. Depending on the request (attach or launch), different attributes are required, and VS Code's launch.json validation and suggestions should help with that.
I had the same issue: the VS Code debugger hitting some breakpoint, but not that of my handler. I traced it down to the running directory not being what VS Code expected.
In my launch.json, I had to change
"localRoot": "${workspaceRoot}",
to
"localRoot": "${workspaceRoot}/hello_world", // or whatever folder your handler lives in
I also noticed that the edit-debug cycle is:
sam local start-api
was a bit better in the sense that I didn't have to reinvoke the cli again, but I still had to reattach after starting another HTTP request, which I thought was weird.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With