-
Notifications
You must be signed in to change notification settings - Fork 279
Closed
Labels
Description
Hey,
VSCode dev here. This milestone I am looking into simplifing generated launch.json for various extensions microsoft/vscode#62851
The launch.json that react native generates is attached at the end. This is too complex for the avarage user and we can improve. I suggest to simplify it the following way:
- Start using
DebugConfigurationProviderand removeinitialConfigurationsfrom the package.json. This will give us a dynamic way of contributing configurations -
DebugConfigurationProvidershould use thequickPickto ask the user if he would like to launch android, launch ios, launch launch exponent or to attach. After that it should just generate one file - Remove default fields which are not necessery like
sourceMaps, andoutDir. They should have the respective default valuestrueand"${workspaceRoot}/.vscode/.react" - You are already contributing
configuraitonSnippetswhich is great. However these snippets also need to be simplified. I suggest to remove all default attributes like sourceMaps and outDir
If you agree with the suggestions I am making here I am also here to help with any potential questions you might have. The changes should not require a lot of work but will simplify the flow a lot imho. It should be much less complex and not too much like a wizard experience
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Attach to packager",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "attach",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug in Exponent",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "exponent",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
}
]
}