Reputation: 8268
I'm working on a flutter web project with VSCode and I noticed some inconsistency between the app when it is rendered by the VSCode debugger or through the command line. The app (color, alignment, font ...) doesn't look the same in both scenarios.
For example, here is what is rendered when I launch the debug in VSCode:
here is the configuration in the launch.json
{
"name": "Launch",
"request": "launch",
"type": "dart",
"program": "lib/main.dart"
},
And here is what is rendered when I run the command
flutter run lib/main.dart
I managed to "fix" the command line display by adding the flag --web-renderer canvaskit
to the command line.
Now, what I would like to know is what are the settings used by the VSCode debugger, and where to find them /modify them?
Upvotes: 0
Views: 2350
Reputation: 1234
Just add this line:
"toolArgs":[ "--web-renderer canvaskit"]
It will become:
{
"name": "Launch",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
"toolArgs":[ "--web-renderer canvaskit"]
},
Upvotes: 0
Reputation: 139
Go to "open configurations" from Run menu
There, in the launch.json
file, you can add your args in this format
Upvotes: 2