You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Debug Console doesn't add clickable links for stdout output line start with string different #number when using new Flutter SDK debug adapters #5360
Describe the bug
Continue #4711 (comment)
Issue not resolved yet
new Flutter SDK debug adapters only handle stdout line start with #0 #1,...
all other lines start with any other strings like [log], flutter,... will not clickable
To Reproduce
Steps to reproduce the behavior:
Use latest Flutter master channel create new project flutter create .
Add example code in build method
final stack = StackTrace.current.toString().split('\n').take(2).join('\n');
final stack2 = '\n$stack';
log(stack);
debugPrint(stack);
log(stack2);
debugPrint(stack2);
Expected behavior
All line with stacktrace location should clickable even this line start with any string not #0, #1,...
Screenshots
Please complete the following information:
You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.
Operating System and version: Windows 11 Build 22635.4515
VS Code version: 1.95.3 (System setup)
Dart extension version: v3.102.3
Dart/Flutter SDK version: v3.102.3
Target device (if the issue relates to Flutter debugging):
Looks like this is because package:stack_trace that we use for parsing frames is quite strict about the frames and doesn't handle when there are prefixes. There are some other issues with using it too, so I'm going to switch to just extracting the paths with a regex instead.
With the changes, all of these seem to work correctly:
Activity
DanTup commentedon Dec 12, 2024
Looks like this is because
package:stack_tracethat we use for parsing frames is quite strict about the frames and doesn't handle when there are prefixes. There are some other issues with using it too, so I'm going to switch to just extracting the paths with a regex instead.With the changes, all of these seem to work correctly:
DanTup commentedon Dec 12, 2024
Change is up for review at https://dart-review.googlesource.com/c/sdk/+/400380.
[dds/dap] Extract URIs from stack traces with regex instead of packag…
DanTup commentedon Jan 6, 2025
This was merged in dart-lang/sdk@131fe7b. The change is in the SDKs, so will show up in a future SDK release (not a VS Code extension release).