[BUG] Debugger crashes when breakpoint exists
paulkre opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Running :lua require 'dap'.continue()
with Launch Flutter
will result in a crash with the following error:
Error retrieving stack traces: type 'double' is not subtype of type 'int' in type cast
(It works in VSCode)
Expected Behavior
The debugger runs correctly and stops at the breakpoint.
Steps To Reproduce
- Create a new project with
flutter create my_app
- Toggle a breakpoint in the
main
function - Run
:lua require 'dap'.continue()
and selectLaunch Flutter
Environment
- OS: macOS 14.0
- Flutter version: 3.16.0
- Is flutter in $PATH: yes
- neovim version: 0.9.2
Anything else?
No response
I am facing the same issue. After some investigation, I found that this is a problem with the latest Flutter version 3.16.0. Looks like at some point thread IDs became int64, while in DAP it is expected to be int32 and that breaks the debugging. I see it is already reverted with this commit dart-lang/sdk@eda6963,
dart-lang/sdk#53086
But unfortunately looks like this commit was not released with the stable Flutter version. My current workaround is to use Flutter beta
channel (Flutter 3.17.0-0.0.pre • channel beta
), debugging works there.
So closing this issue, because there is nothing we can do in this plugin to fix it.
Ah, I was finally getting used to being back on the stable channel! Oh well. Thanks for this, now I know I'm not going crazy.