It should be possible to do some of this through VS Code's Dart debugger, although there are a few things that may not be very obvious:
1. webdev doesn't currently support starting paused, which means that breakpoints in code that runs immediately at startup may not trigger (because the code may run before the editor has finished initialization and sending the breakpoints - there's an open issue
for this here).
For example, in this code only the breakpoint on line 12 is hit:
2. You need to start with --enable-expression-evaluation to enable expression evaluation in webdev (it doesn't seem to currently be enabled by default). The easiest way to do this in VS Code is to add it to args in your launch.json, so it looks like this:
{
"version": "0.2.0",
"configurations": [
{
"name": "dart_web_app",
"request": "launch",
"type": "dart",
"program": "web/index.html",
"args": [
"--enable-expression-evaluation"
]
}
]
}
With that done, I can press F5 in VS Code and have it launch in the browser and hit my breakpoint above, and I am able to evaluate expressions in the debug console:
Not everything works perfectly as there's a lot going on behind the scenes (for example expressions are typed in Dart but also need to be converted to JS for evaluation, and then the resulting JS object presented as if it was a Dart object), but it's definitely worth filing issues for anything you find that's not working (if there aren't existing issues).