-
Notifications
You must be signed in to change notification settings - Fork 302
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
Default/automatic launch configs is missing/incorrect if project is nested inside a folder #2365
Comments
Can you try:
Thanks! |
Hello,
Thanks for the quick response, but i dont really understand what you mean
by- capture logs . I am very new to dart , i dont know much.
…On Sat, Apr 18, 2020 at 9:19 PM Danny Tuppeny ***@***.***> wrote:
Can you try:
- Run the *Dart: Capture Logs* command (untick Analysis Server, but
leave everything else ticked)
- Try to run your app
- Click *Cancel* on the logging prompt to stop logging and open the
log file
- Attach the log file here (make sure there's nothing sensitive in it
first)
Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2365 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOXXRW5YEHCWJG75BFEF2PTRNGZF5ANCNFSM4MLLZCBA>
.
|
Sorry, I should've been clearer! :-)
This will start capturing logs from the extension (a notification will be shown in the bottom right corner that they're being captured).
Let me know if anything isn't clear. Thanks! |
Good day ,
Thanks once again for the reply ,. this is what i got
!! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!
Dart Code extension: 3.9.1
Flutter extension: 3.9.1 (not activated)
VS Code: 1.44.2
Platform: win
Workspace type: Flutter
Multi-root?: false
Dart SDK:
Loc: C:\flutter\bin\cache\dart-sdk
Ver: 2.7.2
Flutter SDK:
Loc: C:\flutter
Ver: 1.12.13+hotfix.9
HTTP_PROXY: undefined
NO_PROXY: undefined
Sun Apr 19 2020 [14:05:24 GMT+0700 (Krasnoyarsk Standard Time)] Log file
started
[2:06:45 PM] [General] [Info] Starting debug session...
[2:06:45 PM] [General] [Info] workspace:
C:\Users\Ekundayo\Desktop\fredses_apk
[2:06:45 PM] [General] [Info] program : bin/main.dart
[2:06:45 PM] [General] [Info] Converted program to absolute path:
C:\Users\Ekundayo\Desktop\fredses_apk\bin\main.dart
[2:06:45 PM] [General] [Info] Using workspace as cwd:
C:\Users\Ekundayo\Desktop\fredses_apk
[2:06:45 PM] [General] [Warn] Launch config references non-existant file
C:\Users\Ekundayo\Desktop\fredses_apk\bin\main.dart
[2:06:45 PM] [General] [Info] Detected launch project as Dart
[2:06:45 PM] [General] [Info] Using Dart debug adapter for this session
[2:06:45 PM] [General] [Info] Checking for errors before launching
[2:06:45 PM] [General] [Info] Debug session starting...
{
"name": "Dart",
"program":
"C:\\Users\\Ekundayo\\Desktop\\fredses_apk\\bin\\main.dart",
"request": "launch",
"type": "dart",
"cwd": "C:\\Users\\Ekundayo\\Desktop\\fredses_apk",
"toolEnv": {
"FLUTTER_HOST": "VSCode",
"PUB_ENVIRONMENT": "vscode.dart-code"
},
"sendLogsToClient": true,
"globalFlutterArgs": [],
"args": [],
"vmAdditionalArgs": [],
"vmServicePort": 0,
"dartPath": "C:\\flutter\\bin\\cache\\dart-sdk\\bin\\dart.exe",
"maxLogLineLength": 2000,
"pubPath": "C:\\flutter\\bin\\cache\\dart-sdk\\bin\\pub.bat",
"pubSnapshotPath":
"C:\\flutter\\bin\\cache\\dart-sdk\\bin\\snapshots\\pub.dart.snapshot",
"debugSdkLibraries": false,
"debugExternalLibraries": true,
"showDartDeveloperLogs": true,
"useFlutterStructuredErrors": true,
"debuggerHandlesPathsEverywhereForBreakpoints": true,
"evaluateGettersInDebugViews": true,
"previewToStringInDebugViews": false,
"useWriteServiceInfo": true,
"debugServer": 60045,
"debuggerType": 0
}
[2:06:46 PM] [Observatory] [Info] [Dart] Spawning
C:\flutter\bin\cache\dart-sdk\bin\dart.exe with args
["--enable-vm-service=0","--pause_isolates_on_start=true","--write-service-info=file:///C:/Users/Ekundayo/AppData/Local/Temp/dart-vm-service-566e.json","-DSILENT_OBSERVATORY=true","--enable-asserts","bin\\main.dart"]
[2:06:46 PM] [Observatory] [Info] [Dart] .. in
C:\Users\Ekundayo\Desktop\fredses_apk
[2:06:46 PM] [Observatory] [Info] [Dart] PID: 12144
[2:06:51 PM] [Observatory] [Info] [Dart] Initialising debugger for ws://
127.0.0.1:65512/Ay03k8HCkVs=/ws
[2:06:51 PM] [Observatory] [Info] [Dart] Connecting to VM Service at ws://
127.0.0.1:65512/Ay03k8HCkVs=/ws
[2:06:52 PM] [Observatory] [Info] [Dart] ==>
{"id":"0","method":"getVersion"}
[2:06:53 PM] [Observatory] [Info] [Dart] <== {"jsonrpc":"2.0",
"result":{"type":"Version","major":3,"minor":28,"_privateMajor":0,"_privateMinor":0},"id":"0"}
[2:06:53 PM] [Observatory] [Info] [Dart] ==> {"id":"1","method":"getVM"}
[2:06:53 PM] [Observatory] [Info] [Dart] <== {"jsonrpc":"2.0",
"result":{"type":"VM","name":"vm","architectureBits":64,"hostCPU":"
Intel(R) Core(TM) i5-3230M CPU @
2.60GHz","operatingSystem":"windows","targetCPU":"x64","version":"2.7.2
(Mon Mar 23 22:11:27 2020 +0100) on
\"windows_x64\"","_profilerMode":"Dart","_nativeZoneMemoryUsage":0,"pid":16452,"startTime":1587280009406,"_embedder":"Dart
VM","_maxRSS":196661248,"_currentRSS":196657152,"isolates":[{"type":"@isolate","id":"isolates\/315640367711283","name":"main","number":"315640367711283"}],"isolateGroups":[{"type":"@IsolateGroup","id":"isolateGroups\/3151245658533916060","name":"isolate_group","number":"3151245658533916060"},{"type":"@IsolateGroup","id":"isolateGroups\/5036809515278577970","name":"isolate_group","number":"5036809515278577970"},{"type":"@IsolateGroup","id":"isolateGroups\/11525209995569407607","name":"isolate_group","number":"11525209995569407607"},{"type":"@IsolateGroup","id":"isolateGroups\/9388559274354461664","name":"isolate_group","number":"9388559274354461664"}]},"id":"1"}
[2:06:53 PM] [Observatory] [Info] [Dart] ==>
{"id":"2","method":"streamListen","params":{"streamId":"Isolate"}}
[2:06:53 PM] [Observatory] [Info] [Dart] ==>
{"id":"3","method":"streamListen","params":{"streamId":"Extension"}}
[2:06:53 PM] [Observatory] [Info] [Dart] ==>
{"id":"4","method":"streamListen","params":{"streamId":"Debug"}}
[2:06:53 PM] [Observatory] [Info] [Dart] ==>
{"id":"5","method":"streamListen","params":{"streamId":"Service"}}
[2:06:53 PM] [Observatory] [Info] [Dart] ==>
{"id":"6","method":"streamListen","params":{"streamId":"Logging"}}
[2:06:53 PM] [Observatory] [Info] [Dart] ==>
{"id":"7","method":"getIsolate","params":{"isolateId":"isolates/315640367711283"}}
[2:06:53 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"2","result":{"type":"Success"}}
[2:06:53 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"3","result":{"type":"Success"}}
[2:06:53 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"4","result":{"type":"Success"}}
[2:06:53 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"5","result":{"type":"Success"}}
[2:06:53 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"6","result":{"type":"Success"}}
[2:06:54 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","method":"streamNotify","params":{"streamId":"Isolate","event":{"type":"Event","kind":"IsolateExit","isolate":{"type":"@isolate","id":"isolates\/315640367711283","name":"main","number":"315640367711283"},"timestamp":1587280014117}}}
[2:06:54 PM] [Observatory] [Info] [Dart] Observatory connection closed:
1005 ()
[2:06:59 PM] [Observatory] [Info] [Dart] Disconnect requested!
[2:06:59 PM] [Observatory] [Info] [Dart] TERM: Requested to terminate with
SIGINT...
[2:06:59 PM] [Observatory] [Info] [Dart] TERM: Terminating processes...
[2:06:59 PM] [Observatory] [Info] [Dart] TERM: Terminating related process
16452 with SIGINT...
[2:06:59 PM] [Observatory] [Info] [Dart] TERM: Terminating main process
with SIGINT...
[2:06:59 PM] [Observatory] [Info] [Dart] TERM: Removing all stored data...
[2:06:59 PM] [Observatory] [Info] [Dart] TERM: Waiting for process to
finish...
[2:06:59 PM] [Observatory] [Info] [Dart] Process exited (1)
[2:06:59 PM] [Observatory] [Info] [Dart] TERM: Disconnecting...
[2:06:59 PM] [General] [Info] Debugger:SessionDuration timing: 13365ms
(Dart)
[2:07:07 PM] [General] [Info] Starting debug session...
[2:07:07 PM] [General] [Info] workspace:
C:\Users\Ekundayo\Desktop\fredses_apk
[2:07:07 PM] [General] [Info] program : bin/main.dart
[2:07:07 PM] [General] [Info] Converted program to absolute path:
C:\Users\Ekundayo\Desktop\fredses_apk\bin\main.dart
[2:07:07 PM] [General] [Info] Using workspace as cwd:
C:\Users\Ekundayo\Desktop\fredses_apk
[2:07:07 PM] [General] [Warn] Launch config references non-existant file
C:\Users\Ekundayo\Desktop\fredses_apk\bin\main.dart
[2:07:07 PM] [General] [Info] Detected launch project as Dart
[2:07:07 PM] [General] [Info] Using Dart debug adapter for this session
[2:07:07 PM] [General] [Info] Checking for errors before launching
[2:07:07 PM] [General] [Info] Debug session starting...
{
"name": "Dart",
"program":
"C:\\Users\\Ekundayo\\Desktop\\fredses_apk\\bin\\main.dart",
"request": "launch",
"type": "dart",
"cwd": "C:\\Users\\Ekundayo\\Desktop\\fredses_apk",
"toolEnv": {
"FLUTTER_HOST": "VSCode",
"PUB_ENVIRONMENT": "vscode.dart-code"
},
"sendLogsToClient": true,
"globalFlutterArgs": [],
"args": [],
"vmAdditionalArgs": [],
"vmServicePort": 0,
"dartPath": "C:\\flutter\\bin\\cache\\dart-sdk\\bin\\dart.exe",
"maxLogLineLength": 2000,
"pubPath": "C:\\flutter\\bin\\cache\\dart-sdk\\bin\\pub.bat",
"pubSnapshotPath":
"C:\\flutter\\bin\\cache\\dart-sdk\\bin\\snapshots\\pub.dart.snapshot",
"debugSdkLibraries": false,
"debugExternalLibraries": true,
"showDartDeveloperLogs": true,
"useFlutterStructuredErrors": true,
"debuggerHandlesPathsEverywhereForBreakpoints": true,
"evaluateGettersInDebugViews": true,
"previewToStringInDebugViews": false,
"useWriteServiceInfo": true,
"debugServer": 60045,
"debuggerType": 0
}
[2:07:08 PM] [Observatory] [Info] [Dart] Spawning
C:\flutter\bin\cache\dart-sdk\bin\dart.exe with args
["--enable-vm-service=0","--pause_isolates_on_start=true","--write-service-info=file:///C:/Users/Ekundayo/AppData/Local/Temp/dart-vm-service-5405.json","-DSILENT_OBSERVATORY=true","--enable-asserts","bin\\main.dart"]
[2:07:08 PM] [Observatory] [Info] [Dart] .. in
C:\Users\Ekundayo\Desktop\fredses_apk
[2:07:08 PM] [Observatory] [Info] [Dart] PID: 18016
[2:07:10 PM] [Observatory] [Info] [Dart] Initialising debugger for ws://
127.0.0.1:49152/a37dOWildik=/ws
[2:07:10 PM] [Observatory] [Info] [Dart] Connecting to VM Service at ws://
127.0.0.1:49152/a37dOWildik=/ws
[2:07:11 PM] [Observatory] [Info] [Dart] ==>
{"id":"0","method":"getVersion"}
[2:07:11 PM] [Observatory] [Info] [Dart] <== {"jsonrpc":"2.0",
"result":{"type":"Version","major":3,"minor":28,"_privateMajor":0,"_privateMinor":0},"id":"0"}
[2:07:11 PM] [Observatory] [Info] [Dart] ==> {"id":"1","method":"getVM"}
[2:07:11 PM] [Observatory] [Info] [Dart] <== {"jsonrpc":"2.0",
"result":{"type":"VM","name":"vm","architectureBits":64,"hostCPU":"
Intel(R) Core(TM) i5-3230M CPU @
2.60GHz","operatingSystem":"windows","targetCPU":"x64","version":"2.7.2
(Mon Mar 23 22:11:27 2020 +0100) on
\"windows_x64\"","_profilerMode":"Dart","_nativeZoneMemoryUsage":0,"pid":11208,"startTime":1587280028593,"_embedder":"Dart
VM","_maxRSS":204513280,"_currentRSS":204509184,"isolates":[{"type":"@isolate","id":"isolates\/1767369391692067","name":"main","number":"1767369391692067"}],"isolateGroups":[{"type":"@IsolateGroup","id":"isolateGroups\/17152143887431477114","name":"isolate_group","number":"17152143887431477114"},{"type":"@IsolateGroup","id":"isolateGroups\/368378634050564530","name":"isolate_group","number":"368378634050564530"},{"type":"@IsolateGroup","id":"isolateGroups\/10628802018320681979","name":"isolate_group","number":"10628802018320681979"},{"type":"@IsolateGroup","id":"isolateGroups\/4116673186035954439","name":"isolate_group","number":"4116673186035954439"}]},"id":"1"}
[2:07:11 PM] [Observatory] [Info] [Dart] ==>
{"id":"2","method":"streamListen","params":{"streamId":"Isolate"}}
[2:07:11 PM] [Observatory] [Info] [Dart] ==>
{"id":"3","method":"streamListen","params":{"streamId":"Extension"}}
[2:07:11 PM] [Observatory] [Info] [Dart] ==>
{"id":"4","method":"streamListen","params":{"streamId":"Debug"}}
[2:07:11 PM] [Observatory] [Info] [Dart] ==>
{"id":"5","method":"streamListen","params":{"streamId":"Service"}}
[2:07:11 PM] [Observatory] [Info] [Dart] ==>
{"id":"6","method":"streamListen","params":{"streamId":"Logging"}}
[2:07:11 PM] [Observatory] [Info] [Dart] ==>
{"id":"7","method":"getIsolate","params":{"isolateId":"isolates/1767369391692067"}}
[2:07:11 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"2","result":{"type":"Success"}}
[2:07:11 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"3","result":{"type":"Success"}}
[2:07:11 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"4","result":{"type":"Success"}}
[2:07:11 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"5","result":{"type":"Success"}}
[2:07:11 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","id":"6","result":{"type":"Success"}}
[2:07:12 PM] [Observatory] [Info] [Dart] <==
{"jsonrpc":"2.0","method":"streamNotify","params":{"streamId":"Isolate","event":{"type":"Event","kind":"IsolateExit","isolate":{"type":"@isolate","id":"isolates\/1767369391692067","name":"main","number":"1767369391692067"},"timestamp":1587280032444}}}
[2:07:12 PM] [Observatory] [Info] [Dart] Observatory connection closed:
1005 ()
[2:07:17 PM] [Observatory] [Info] [Dart] Disconnect requested!
[2:07:17 PM] [Observatory] [Info] [Dart] TERM: Requested to terminate with
SIGINT...
[2:07:17 PM] [Observatory] [Info] [Dart] TERM: Terminating processes...
[2:07:17 PM] [Observatory] [Info] [Dart] TERM: Terminating related process
11208 with SIGINT...
[2:07:17 PM] [Observatory] [Info] [Dart] TERM: Terminating main process
with SIGINT...
[2:07:17 PM] [Observatory] [Info] [Dart] TERM: Removing all stored data...
[2:07:17 PM] [Observatory] [Info] [Dart] TERM: Waiting for process to
finish...
[2:07:17 PM] [Observatory] [Info] [Dart] Process exited (1)
[2:07:17 PM] [Observatory] [Info] [Dart] TERM: Disconnecting...
[2:07:17 PM] [General] [Info] Debugger:SessionDuration timing: 9451ms (Dart)
Sun Apr 19 2020 [14:08:31 GMT+0700 (Krasnoyarsk Standard Time)] Log file
ended
…On Sat, 18 Apr 2020 at 21:35, Danny Tuppeny ***@***.***> wrote:
Sorry, I should've been clearer! :-)
- Open the VS Code command palette by pressing Ctrl+Shift+P (or on
macOS, Cmd+Shift+P)
- Type "capture logs" to filter the command list, and select the *Dart:
Capture Logs* option
- Untick *Analysis Server* (those logs aren't relevant here) and click
*OK*
This will start capturing logs from the extension (a notification will be
shown in the bottom right corner that they're being captured).
- Try to launch your app so that you get the original error message
from above
- Click *Cancel* on the logging notification to stop logging, and open
the log file
- Check the log file doesn't include anything sensitive (it may have
path/filenames and other things from your project depending on how long you
were capturing)
- Save the log file and attach it here
Let me know if anything isn't clear. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2365 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOXXRW3V2EXRTEYLRAEM633RNG3DTANCNFSM4MLLZCBA>
.
|
It looks like in your
However this file doesn't exist in your project. If it's a Flutter project, this should be I'm not sure how you ended up with this file with the wrong value though - |
Good day, I',m back with almost same problem. I cant debug, its saying
Your launch config references a program that does not exist. If you have
problems launching, check the "program" field in your ".vscode/launch.json"
file.
…On Sun, Apr 19, 2020 at 2:54 PM Danny Tuppeny ***@***.***> wrote:
It looks like in your .vscode/launch.json file, you have:
"program":"bin/main.dart"
However this file doesn't exist in your project. If it's a Flutter
project, this should be "lib/main.dart"(or, if you've not customised the
launch.json, you can just delete the file altogether).
I'm not sure how you ended up with this file with the wrong value though -
bin/main.dart is the default value for a (non-Flutter) Dart project. Did
you create this file and select the "Dart" template, or has it been created
automatically?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2365 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOXXRW7D2KBADCHFFU5XW5LRNKU23ANCNFSM4MLLZCBA>
.
|
@trimmdavid this happens if your launch.json has a
Thanks! |
Hi Dan unluckily I am also facing the same problem, every thing was going fine and suddenly it stopped working and this alert started to appear at bottom right corner of my screen saying "Your launch config references a program that does not exist. If you have problems launching, check the "program" field in your ".vscode/launch.json" file." kindly help me out in this problem. |
The above problem is solved, actually I keep on tracking with github so I have the previous working commit of this project, when I checked that out this line: "program":"bin/main.dart" It was not their and I didn't made any changes in this file aswell, so I deleted this line and and saved my project and when I reopened it every thing worked fine again like it was working before this error. |
Hello, I had this isuue. I solved it by deleting the launch.js file and creating a new config using vs code. |
You shouldn't really need a launch.json for simple cases, it should just work without. Some actions in VS Code will trigger creation of a |
If there are other projects/folders on your vscode workspace, check and correct their ".vscode/launch.json" file configs. Or just remove those projects from the workspace. |
Thanks, deleting the launch.js file and without creating a new config solved my debug/run problem. |
It sounds like a |
I'm not sure why using those args would cause this error - please file a bug about that, I believe that should still "just work".
Ah, interesting. Can you confirm what your workspace looks like? Have you opened a folder that contains multiple projects, or is it a multi-root workspace with multiple projects?
Generally if we can infer the file, I'd prefer not to create a
I think this might now be covered by the automatic launch configs? |
@danielbee I tried to reproduce what's in your screenshot above, but when I don't have a How did you get to the the dropdown/cog icon you have without a launch.json? |
Hi @DanTup, My workspace is set-up like this: (A single folder with multiple projects in sub-directories - Compera_app and compera_test are both flutter projects) After I hit F5 from my main.dart, i see the following: Note, I only see the cog after I have hit F5, and during debug. As soon as I close the chrome window or stop (Shift + F5) the application, The debugging screen reverts to what you've shown.
Apologies, the opposite is true. Without those args, i get refused to connect. I think my laptop has some organisation/firewall that restricts connections through specific ports. When i don't force the port to be a specific value, dart seems to just give a random port, which doesn't work for me.
When I am given the option to create the launch.json (with the cog shown), i'm already in a debug of a running project; so i'd expect the launch.json to map the program field to the application that is currently being run. I agree that ideally, we don't need any launch.json. However, In my instance i need to create one to work around organisation security and provide launch-specific args. |
I think this part is what is at fault.
If I click show all automatic debug configs: |
Thanks - I can repro. The issue here is that your Flutter project is in a sub-folder, so when VS code asks us for the I'll see if maybe we can take some hints from the current open file, so at least in the case where there's an open file (like in your screenshot) we should find something.
Ah, got it. That makes sense now! |
Ok, I think I've come up with a reasonable solution for this. For the "Create launch.config", we'll now locate the project roots and create a launch config for each one. In the example above there was only one, but here's an example where the folder had a Dart project and two Flutter projects in it: Similarly, for the "Automatic launch configs" we'll now scan each of those project roots, rather than just the main workspace root and also include options for Dart web and Test: |
i fixed it by replacing package name. from "bin/main.dart" to "web/main.dart" |
@ranadhaval123 please file a new issue, and include the exact steps that led you to that error. Thanks! |
if any of the solutions above didn't help, try to change launch program config like this.
Only this helped me |
i keep on having this problem : Your launch config references a program that does not exist. If you have problems launching, check the "program" field in your ".vscode/launch.json" file.
The text was updated successfully, but these errors were encountered: