Open Dmytry opened 7 months ago
Tested it some, works via environment variables, got 2 windows each with its own view without a problem. Probably would be good to have a button to auto add a launch configuration with the "env" line from above, but usable as it is now.
Not sure I understand how --port
can then be easily used with ín the client in set_port
.
I think the environment variable approach is the easier one and would even work without launch.json
, isn't it?
I think the environment variable still needs launch.json, that's where I set it from, the "env": {"ocp_port": "${command:ocpCadViewer.port}" line.
Not sure if there's any other good way to set it. I think it's usable as it is, the user would have to modify their launch.json . Later I may try to find how to add an option to create launch.json via the menu.
Launch.json used:
Seems to work, the command is launched with --port 3939 as expected. May need some checks in case the viewer isn't running yet, and maybe even auto-starting the viewer when ocpCadViewer.port command is called.