Skip to content
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

Native shell debugger just like flutter for Vscode / android studio #68

Closed
prateekmedia opened this issue Aug 22, 2021 · 4 comments
Closed

Comments

@prateekmedia
Copy link

Currently we have to run the app manually using cargo run, It would be interesting to see if there will be a debugger for this.

This will make this package developer friendly and also in future when you add hot restart or reload, then we don't have to use the terminal instead use the debugger in our IDE(vscode is more general then android-studio for desktop).

@knopp
Copy link
Contributor

knopp commented Aug 22, 2021

There is a launcher configuration for vscode that you can use to attach to running process to get debugging and hot reload functionality. There's no such thing for android studio unfortunately because the intellij flutter plugin doesn't support attach on desktop.

@knopp knopp closed this as completed Aug 22, 2021
@prateekmedia
Copy link
Author

prateekmedia commented Aug 22, 2021

There is a launcher configuration for vscode

@knopp Any links or additional information will be appreciated.

@knopp
Copy link
Contributor

knopp commented Aug 22, 2021

See this file: https://github.com/nativeshell/app_template/blob/main/.vscode/launch.json

After you launch app with cargo run, you can launch the Flutter: Attach to Process configuration from VSCode and it should attach to running process.

@thenextman
Copy link
Contributor

Note that this wouldn't work for me if my nativeshell project was not the root folder in VSCode. It would always fail to connect to the VM service.

I resolved that by creating a VS Code workspace; this allowed creating the .vscode/launch.json inside the nativeshell project folder instead of at the root directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants