Skip to content

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

Merged
merged 2 commits into from
Dec 10, 2018

Conversation

stuartmorgan-g
Copy link
Collaborator

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.

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",
Copy link
Contributor

@franciscojma86 franciscojma86 Dec 7, 2018

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pause*

Copy link
Collaborator Author

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
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

@franciscojma86 franciscojma86 merged commit 06989e1 into google:master Dec 10, 2018
@stuartmorgan-g stuartmorgan-g deleted the debugging-info branch December 12, 2018 19:22
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants