Skip to content

Commit

Permalink
added troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhard-42 committed Nov 14, 2024
1 parent 50a7b95 commit f7df751
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ _OCP CAD Viewer_ for VS Code is an extension to show [CadQuery](https://github.c
- Install the Python extension in VS Code
- Continue with 1. above

**Note:** Do not use the _OCP CAD Viewer_ logo to verify your _OCP CAD Viewer_ settings! The logo overwrites all your settings in VS Code with its own settings to always look the same on each instance. Use a simple own model for checking your conmfiguration
**Notes:**

- Do not use the _OCP CAD Viewer_ logo to verify your _OCP CAD Viewer_ settings! The logo overwrites all your settings in VS Code with its own settings to always look the same on each instance. Use a simple own model for checking your conmfiguration

- If you run into issues, see [Troubleshooting](#troubleshooting)

## Usage

Expand Down Expand Up @@ -272,6 +276,24 @@ NATIVE_TESSELLATOR=1 OCP_VSCODE_PYTEST=1 pytest -v -s pytests/

## Troubleshooting

- **Generic ("it doesn't work")**

1) Confirm that VS Code extension and ocp_vscode have the same version. This can be seen in the OCP CAD Viewer UI. Or alternatively in the Output panel of VS Code:

```text
[19:56:07.114} INFO ] ocp_vscode library version 2.6.1 matches extension version 2.6.1
```

2) Test whether the standalone viewer works, see [Standalone mode](#standalone-mode) (to eliminate VS Code issues)
3) Open a work folder and not a Python file (to ensure we do not get in Python path problems)
4) Check the Output panel. Search for:
- `PythonPath: 'aaa/bbb/python'` **=> right Python environment?**
- `Server started on port xxxx` (or so) **=> right port? default is 3939**
- `Starting Websocket server` **=> should not be followed by an error**
- `OCP Cad Viewer port: xxxx, folder: yyyy zzzz` **=> yyyy should be the right working folder?**
5) If all looks fine until now, then toggle Developer tools in VS Code and check browser console. Often we see a WebGL error for the browser of VS Code used for the viewer.


- **CAD Models almost always are invisible in the OCP viewer window**

```bash
Expand Down

0 comments on commit f7df751

Please sign in to comment.