-
Notifications
You must be signed in to change notification settings - Fork 610
Add initial debugging instructions #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Provides basic instructions for debugging the Flutter side of a desktop application, since the normal approaches for Flutter debugging require some modifications on desktop. Related to issue google#14 and issue google#164, although doesn't fully address either.
``` | ||
{ | ||
"name": "Flutter Desktop Attach", | ||
"request": "attach", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't attach for me until I added "program" : "example/flutter_app/lib/main.dart". Is this the case for you as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like you opened the repo root in VS Code, rather than opening just the Flutter application as the instructions mention to do. program
shouldn't be necessary in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was still in root since I was already working there. Thanks!
Debugging.md
Outdated
You will likely want to hard-code your observatory port, otherwise you will | ||
need to change `launch.json` every time you relaunch the app. | ||
|
||
In addition to the Flutter debug commands, source-level debugging with pausee, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pause*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
|
||
### Command Line | ||
|
||
The `flutter attach` command can connect to a desktop Flutter application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is obvious, but might be worth clarifying that this command should be called from a directory that contains 'lib/main.dart'. I was getting an error when trying from another directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was assuming people using the command-line instructions would be familiar with needing to run flutter
commands from the Flutter application directory, but it can't hurt to add. Done.
Provides basic instructions for debugging the Flutter side of a desktop
application, since the normal approaches for Flutter debugging require
some modifications on desktop.
Related to issue #14 and issue #164, although doesn't fully address
either.