nvim-flutter / nvim-flutter/flutter-tools.nvim

[BUG] Cannot use require('dap').continue() before running either FlutterRun or FlutterDebug

Open
#475 0 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
1.4k
Forks
116
Avg merge
3m
Merged PRs (30d)
1

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

I've noticed in several issues (i.e. here or here) that you cannot run require('dap').continue() to start debugging unless you've ran :FlutterRun or :FlutterDebug first.

This strikes me as weird and unintended, as the Readme indicates that the DAP configs are set up for you, but that only seems to actually be the case once you run via the plugin for the first time. But no one seemed to actually consider this a bug from what it seems.

If you try to run :lua require('dap').continue() before running any flutter-tools commands, you get this error:

No configuration found for dart. You need to add configs to dap.configurations.dart (See :h dap-configuration)`

Is this intended behaviour?

Expected Behavior

:lua require('dap').continue() should launch a debug session without having to run :FlutterRun or :FlutterDebug first.

Steps To Reproduce
  1. open a flutter project
  2. run :lua require('dap').continue()
  3. you will get an error
  4. run :FlutterRun
  5. run :lua require('dap').terminate()
  6. run :lua require('dap').continue()
  7. you will now get to pick the configuration to use
Environment
- OS: NixOS 25.05
- Flutter version: 3.32.0
- Is flutter in $PATH: Yes
- NeoVim version: 0.11.1
Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with require('dap').continue() before and after :FlutterRun, then inspect the plugin entry points involved in those commands and their DAP setup. Done means require('dap').continue() launches a debug session in a Flutter project before either Flutter command has run.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter, lua, neovim
Domain
devtools, mobile-dev, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.