Reformat Readme.MD.
This commit is contained in:
@@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
You must stop the pipdeal service before launching a debug instance of pipedal:
|
You must stop the pipdeal service before launching a debug instance of pipedal:
|
||||||
|
|
||||||
> sudo systemctl stop pipedal
|
sudo systemctl stop pipedal
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
> pipedalconfig -stop
|
pipedalconfig -stop
|
||||||
|
|
||||||
But there's no harm in running a debug react server that's configured to connect to the web
|
But there's no harm in running a debug react server that's configured to connect to the web
|
||||||
socket of a production instance of pipedal.
|
socket of a production instance of pipedal.
|
||||||
@@ -36,12 +36,12 @@ Actual debugging is performed using the Chrome debugger (which is remarkably wel
|
|||||||
|
|
||||||
To get this to work on Raspberry Pi, you will probably have to make a configuration change.
|
To get this to work on Raspberry Pi, you will probably have to make a configuration change.
|
||||||
|
|
||||||
Edit the file '/etc/sysctl.conf', and add or increase the value for the maximum number of watchable user
|
Edit the file `/etc/sysctl.conf`, and add or increase the value for the maximum number of watchable user
|
||||||
files:
|
files:
|
||||||
|
|
||||||
> fs.inotify.max_user_watches=524288
|
fs.inotify.max_user_watches=524288
|
||||||
|
|
||||||
followed by 'sudo sysctl -p'. (VS Code and React both need this change).
|
followed by `sudo sysctl -p`. (VS Code and React both need this change).
|
||||||
|
|
||||||
By default, the React app will attempt to contact the pipedal server on ws:*:8080 -- the address on which
|
By default, the React app will attempt to contact the pipedal server on ws:*:8080 -- the address on which
|
||||||
the debug version of systemctld listens on. This can be reconfigured
|
the debug version of systemctld listens on. This can be reconfigured
|
||||||
@@ -50,11 +50,12 @@ points the react app at itself in production). The React app will display the me
|
|||||||
"Error: Failed to connect to the server", until you start the pipedal websocket server in the VSCode debugger.
|
"Error: Failed to connect to the server", until you start the pipedal websocket server in the VSCode debugger.
|
||||||
It's quite reasonable to point the react debug app at a production instance of the pipedal server.
|
It's quite reasonable to point the react debug app at a production instance of the pipedal server.
|
||||||
|
|
||||||
> react/public/var/config.json:
|
react/public/var/config.json:
|
||||||
> {
|
{
|
||||||
> "socket_server_port": 80,
|
...
|
||||||
> "socket_server_address": "*",
|
"socket_server_port": 80,
|
||||||
> ...>
|
"socket_server_address": "*",
|
||||||
|
...
|
||||||
> }
|
> }
|
||||||
|
|
||||||
Setting socket_server_address to "*" configures the web app to reconnect using the host address the browser
|
Setting socket_server_address to "*" configures the web app to reconnect using the host address the browser
|
||||||
@@ -66,23 +67,23 @@ Visual Studio Code, and it will detect the CMake build files, and configure itse
|
|||||||
the CMake plugin in Visual Studio Code to configure itself, after loading.
|
the CMake plugin in Visual Studio Code to configure itself, after loading.
|
||||||
|
|
||||||
Once CMake has configured itself, build and debug commands are avaialble on the CMake toolbar at the
|
Once CMake has configured itself, build and debug commands are avaialble on the CMake toolbar at the
|
||||||
bottom of the Visual Studio Code window. Set the build variant to debug. Set the debug target to "pipedal".
|
bottom of the Visual Studio Code window. Set the build variant to debug. Set the debug target to "pipedald".
|
||||||
Click on the Build button to build the app. Click on the Debug button to launch a debugger.
|
Click on the Build button to build the app. Click on the Debug button to launch a debugger.
|
||||||
|
|
||||||
To get the debugger to launch and run correctly, you will need to set commandline parameters for pipedal.
|
To get the debugger to launch and run correctly, you will need to set commandline parameters for pipedald.
|
||||||
Commandline arguments can be set in the file .vscode/settings.json:
|
Commandline arguments can be set in the file .vscode/settings.json:
|
||||||
|
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
"cmake.debugConfig": {
|
"cmake.debugConfig": {
|
||||||
"args": [
|
"args": [
|
||||||
"\<projectdirectory\>/debugConfig","\<projectdirectory\>/build/react/src/build", "-port", "0.0.0.0:8080"
|
"<projectdirectory>/debugConfig","<projectdirectory>/build/react/src/build", "-port", "0.0.0.0:8080"
|
||||||
],
|
],
|
||||||
|
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
where <projectdirectory> is the root directory of the pipedal project.
|
where `<projectdirectory>` is the root directory of the pipedal project.
|
||||||
|
|
||||||
The default debug configuration for pipedal is configured to use /var/pipedal for storing working data files,
|
The default debug configuration for pipedal is configured to use /var/pipedal for storing working data files,
|
||||||
which allows it to share configuration with a production instance of pipedal. Be warned that the permissioning
|
which allows it to share configuration with a production instance of pipedal. Be warned that the permissioning
|
||||||
@@ -94,11 +95,11 @@ incorrectly.
|
|||||||
You will need to add your userid to the pipedal_d group if you plan to share the /var/pipedal directory.
|
You will need to add your userid to the pipedal_d group if you plan to share the /var/pipedal directory.
|
||||||
|
|
||||||
You can avoid all of this, by configuring the debug instance to use a data folder in your home directory. Edit
|
You can avoid all of this, by configuring the debug instance to use a data folder in your home directory. Edit
|
||||||
debugConfig/config.json:
|
`debugConfig/config.json`:
|
||||||
|
|
||||||
> {
|
{
|
||||||
> ...
|
...
|
||||||
> "local_storage_path": "~/var/pipedal",
|
"local_storage_path": "~/var/pipedal",
|
||||||
> ...
|
...
|
||||||
> }
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user