mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-04-06 17:31:09 +08:00
Add renderer process debugging
This commit is contained in:
parent
3928c8d24e
commit
d790320469
8
.vscode/launch.json
vendored
8
.vscode/launch.json
vendored
@ -26,6 +26,14 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug Renderer",
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
"port": 9223,
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"timeout": 30000
|
||||
}
|
||||
]
|
||||
}
|
20
README.md
20
README.md
@ -22,14 +22,30 @@ Check out the [Contribution Guidelines](CONTRIBUTING.md).
|
||||
|
||||
## Launching Blockbench
|
||||
|
||||
To launch Blockbench from source, you can clone the repository, navigate to the correct branch and launch the program in development mode using the instructions below. If you just want to use the latest version, please download the app from the website.
|
||||
To launch Blockbench from source, you can clone the repository, navigate to the correct branch and launch the program in development mode using the instructions below.
|
||||
If you just want to use the latest version, please download the app from the website.
|
||||
|
||||
### Setup Repository
|
||||
* Install [NodeJS](https://nodejs.org/en/).
|
||||
* Then install all dependencies via
|
||||
`npm install`
|
||||
* Finally, launch Blockbench using
|
||||
|
||||
|
||||
### Run in Electron
|
||||
Use this command or press Ctrl + Shift + B to launch Blockbench in Electron:
|
||||
|
||||
`npm run dev`
|
||||
|
||||
To enable debugging in VS Code, switch to the **Run & Debug** tab, select the **"Debug Renderer"** configuration, and press the green arrow button to launch.
|
||||
Now you can set breakpoints and debug inside VSCode.
|
||||
|
||||
|
||||
### Run the web app
|
||||
Use this command to launch the web app locally:
|
||||
|
||||
`npm run serve`
|
||||
|
||||
Now you can open the web app in your browser under http://localhost:3000
|
||||
|
||||
|
||||
## Plugins
|
||||
|
@ -120,7 +120,7 @@
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "concurrently --raw \"electron .\" \"node ./build.js --target=electron --watch\" --kill-others --success=first",
|
||||
"dev": "concurrently --raw \"electron --remote-debugging-port=9223 .\" \"node ./build.js --target=electron --watch\" --kill-others --success=first",
|
||||
"serve": "node ./build.js --target=web --serve",
|
||||
"electron": "electron .",
|
||||
"build-web": "node ./build.js --target=web",
|
||||
|
Loading…
x
Reference in New Issue
Block a user