Closed muzaffar-omer closed 1 year ago
It looks like flutter is not following the spec... Only Content-Length is specified as a valid header.
But nevertheless could you try the following for me?
(setq dape--content-length-re
"\\(?:.*: .*\r?\n\\)*\
Content-Length: [[:digit:]]+\r?\n\
\\(?:.*: .*\r?\n\\)*\
\r?\n"
But nevertheless could you try the following for me?
Sure!. After setting the dape--content-length-re
:
(setq dape--content-length-re
"\\(?:.*: .*\r?\n\\)*\
Content-Length: [[:digit:]]+\r?\n\
\\(?:.*: .*\r?\n\\)*\
\r?\n")
Now in the *dape-debug*
buffer I get:
[info] Starting new single session
[info] Process started ("flutter" "debug_adapter")
[io] Sending:
(:arguments
(:clientID "dape" :adapterID "flutter" :pathFormat "path"
:linesStartAt1 t :columnsStartAt1 t
:supportsRunInTerminalRequest t :supportsProgressReporting
t :supportsStartDebuggingRequest t)
:type "request" :command "initialize" :seq 1)
[io] Received:
(:seq 2 :type "event" :body nil :event "initialized")
[io] Sending:
(:type "request" :command "configurationDone" :seq 2)
[io] Received:
(:seq 3 :type "response" :command "configurationDone" :request_seq 2
:success t)
[error] Timeout for reached for seq 1
And the *dape-processes*
buffer is empty
After some testing this seams like an Dape parsing issue. Working on it :)
There where a couple of issues with Dape that stopped flutter debug_adapter
from working.
But they should be fixed.
Used the following config to run the application on macos.
You will need to change "macos"
in ["-d" "macos"]
and used dape-find-file-buffer-default to point to
/lib/main.dart
.
(flutter-macos
modes (dart-mode)
command "flutter"
command-args ("debug_adapter" "--verbose")
command-cwd dape-cwd-fn
:type "dart"
:request "launch"
:cwd dape-cwd-fn
:program dape-find-file-buffer-default
:toolArgs ["-d" "macos"])
Ran into some issues where the flutter app would crash when using eldoc hover and watch when entering some scopes, but this was reproducible in vscode as well so that is an flutter issue.
I believe it's the same as https://github.com/Dart-Code/Dart-Code/issues/3185
Please get back to me when you have tested with the new changes.
The fix works perfectly!!! :ok_hand: :partying_face:
Thank you so much for the quick fix :-)
Closing the issue.
Hello,
Thank you so much for the so needed awesome package!! :-)
Description
When I try dape with flutter debug adapter, I get the below error in
*dape-debug*
buffer:Although, in the debug adapter logs (buffer
*dape-processes*
) It looks like the response for seq 1 request was sent from the adapter:How to reproduce
Install flutter SDK as described in the manual SDK installation.
Install the
dart-mode
package.Add flutter dape config:
I used https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/debug_adapters/README.md as a reference for the configuration.
Create a flutter app from the CLI using the command:
flutter create testapp
Open the
testapp/lib/main.dart
file, and startdape
.