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

[Question]: Enabled/disabled debugging mode #414

Closed
Kiruel opened this issue Dec 1, 2024 · 12 comments · Fixed by #420
Closed

[Question]: Enabled/disabled debugging mode #414

Kiruel opened this issue Dec 1, 2024 · 12 comments · Fixed by #420
Assignees

Comments

@Kiruel
Copy link

Kiruel commented Dec 1, 2024

Hello,

Quick question here: Is it possible to enable/disable the dap without changing this variable every time we need to use the debugger?

debugger = {
        enabled = true, // This one ?
},

I cannot find any solution to run the project in debug mode without changing this every time and re-opening nvim.

Thanks!

@sidlatau
Copy link
Collaborator

sidlatau commented Dec 2, 2024

No, there is currently no option to change the debugger.enabled value. However, I am considering adding a :FlutterDebug command for this purpose. This command would not depend on the debugger.enabled setting and could always start Flutter in debug mode. Would this approach work for you?

@Kiruel
Copy link
Author

Kiruel commented Dec 2, 2024

Yes it could be a nice solution ! So we could have same as vscode, "start debugging" "run without debugging". And will start dap if debugging.
Waiting for this feature then :) ! Thanks !

@Kiruel Kiruel closed this as completed Dec 2, 2024
@sidlatau sidlatau self-assigned this Dec 2, 2024
@sidlatau
Copy link
Collaborator

sidlatau commented Dec 2, 2024

I reopened this case to ensure it is not forgotten :)

@sidlatau sidlatau reopened this Dec 2, 2024
@sidlatau
Copy link
Collaborator

sidlatau commented Dec 2, 2024

By the way, is there any particular reason you're switching between debug and non-debug modes, @Kiruel ? I recently fixed some commands that weren't working in debug mode (e.g., "Inspect widget"). Is there anything else that needs fixing?

@Kiruel
Copy link
Author

Kiruel commented Dec 2, 2024

Yes during dev, on a big codebase I switch between this two. It's common also to get some information without print everywhere.
For now I don't really use debugger in neovim because I need to change the variable reopen open.
But using vscode instead when I use the debugger.
Have not try during unit test also but will test if you need me on that.

@Kiruel
Copy link
Author

Kiruel commented Dec 2, 2024

I will mention also if you add the debugger via flutterdebug it should be possible to hotreaload right ?

@sidlatau
Copy link
Collaborator

sidlatau commented Dec 2, 2024

Yes, hot reload/hot restart works in debug mode. I use debug mode as my default mode, it works without problems.

@kamskry
Copy link

kamskry commented Dec 13, 2024

Hello @sidlatau
I also use debug mode as my default but I had some issues:

  1. Sometimes I don't want debugger to stop at exceptions. It's more dap related and I found a way to toggle that with: https://github.com/lucaSartore/nvim-dap-exception-breakpoints
  2. open_dev_tools is not yet implemented for DAP runner - which is my main issue with debug mode.

Now if I want to use Devtools, I have to run app via cli or other IDE. Would love to have that enabled in debug mode. Until that is available switching between debug and non-debug modes would be nice.

@sidlatau
Copy link
Collaborator

Hi, @kamskry, I made Open Dev Tools command work in debug mode via:
#419
Could you check if it works for you?

@kamskr
Copy link

kamskr commented Dec 24, 2024

@sidlatau Yes, it works! Thank you so much, this is amazing

@sidlatau sidlatau linked a pull request Dec 27, 2024 that will close this issue
@Kiruel
Copy link
Author

Kiruel commented Jan 8, 2025

Do I need to wait a new release to test it @sidlatau or I can switch to use main ?

@sidlatau
Copy link
Collaborator

sidlatau commented Jan 8, 2025

Please use the main branch for now. New releases are on hold while we wait for #393 to be resolved.

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

Successfully merging a pull request may close this issue.

4 participants