Cannot set breakpoint for "Debug in Browser" test
See original GitHub issueFiles
I have this configuration in launch.json:
{
"name": "Debug in Browser",
"request": "launch",
"type": "dart",
"template": "debug-test",
"args": [
"-p",
"chrome"
]
}
and this test file:
import 'package:test/test.dart';
void main() {
test('read write', () async {
expect(1, 1);
});
}
Actions
- I can see
Debug in browser
command in my test file as expected. - I set a breakpoint at
expect(1, 1)
line. - When I click on the
Debug in browser
command I can see following compilation message in command window but no breakpoint hits
Compiled 9,009,955 characters Dart to 1,035,479 characters JavaScript in 8.44 seconds
...
✓ read write
Exited
Doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v1.13.6-pre.44, on Microsoft Windows [Version 10.0.18362.535], locale cs-CZ)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
X No Java Development Kit (JDK) found; You must have the environment variable JAVA_HOME set and the java binary in your PATH. You can download the JDK from https://www.oracle.com/technetwork/java/javase/downloads/.
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.4.0)
[!] Android Studio (version 3.5)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
X Unable to determine bundled Java version.
[√] VS Code (version 1.41.1)
[√] Connected device (3 available)
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Chrome DevTools won't let me set breakpoints on certain lines
We made our changes and then hit Ctrl + S (or Cmd + S) to save the changes in the debugger and then...
Read more >Troubleshoot Breakpoints in the Visual Studio Debugger
Go to the Modules window (Debug > Windows > Modules) and check whether your module is loaded. If your module is loaded, check...
Read more >Can't set Debugger breakpoints - Mozilla Discourse
I can no longer set breakpoints in the Debugger. It have tried 3 different ways and nothing works. I click on the line...
Read more >Pause your code with breakpoints - Chrome Developers
Use breakpoints to pause your JavaScript code. This guide explains each type of breakpoint that's available in DevTools, as well as when to ......
Read more >DevTools: Can't set breakpoints on inline Javascript - Monorail
URLs (if applicable) : Other browsers tested: Add OK or FAIL after other browsers where you have tested this issue: Safari 5: Firefox...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DanTup, thanks a lot. I missed this vs code feature, everything is now easier.
Sorry for the delay in responding! The
launch.json
you posted is good, though you don’t really need it - if you delete thelaunch.json
, when you pressF5
it will launch on whichever device is selected in the status bar:Clicking the device name there allows you to switch between devices (whereas the
launch.json
you showed will always run on Chrome, regardless of what’s selected here).If you have any issues with this (or questions), do shout!