-
Notifications
You must be signed in to change notification settings - Fork 340
Description
Describe the bug
- VS code does not stop on my breakpoint the first time a web page is run through a debug session.
- when refreshing the web page, the breakpoint is indeed hit, and the locations of the breakpoints are not correctly displayed with a red dot.
- a
Which DevTools page?message keeps being displayed in the command palette everything time a debug session is initiated. Is this expected? How to get rid of this?
To Reproduce
Steps to reproduce the behavior:
- Create a new dart project with
dart create -t web dartwebapp - Open the
main.dartfile, place a breakpoint on the first line, and start a debug session by clicking theDebugtext abovemain.
Expected behavior
The web page should be open, and the debugger should stop on the first line of code. All breakpoint locations should be displayed with a red dot.
Actual behavior
VS code asks to activate webdev when running a debug session for the first time. OK with me. To be on the safe side, I then close VS code then reload it, and start the debug session (not closing and restarting VS triggers weird stuff in the console, with Write failed errors and weird GET /packages/...dill messages).
- a web page opens and the main function is run
- my breakpoint is not hit
- in the VS window, I see a
Which DevTools page?in the command palette, with choices ranging fromOpen Widget Inspector PagetoOpen DevTools in Web Browser. I choose this latter option. A new browser window opens with 'Connected app'.
Now I hit refresh on my web page.
- the debugger does stop, but it stops on another main.dart file, which path is 'org-dartlang-app:..\web\main.dart'. The breakpoints are not correctly shown in this file.
I close the debug session, and start a new one: Which DevTools page? is, again, proposed.
What is exactly this option for, how to define it once for all and is it possible for VS code to debug my actual main.dart file, not the other main.dart file (see above)?
- Operating System and version: Windows 11
- VS Code version: 1.87.0
- Dart extension version: 3.84.0
- Dart/Flutter SDK version: 3.19.2
- Target device (if the issue relates to Flutter debugging):