Written by

Owner at NiPaRpbotica
Question Nigel Salm · Oct 4, 2020

How to run a CSP page in VS Code

Hi

How do I run a CSP page from within VS Code.

Secondly I have installed an extension called "Live Server" which will run .html pages within VS Code. Have any of you made use of this extension and if so can you specify that .csp pages are html pages?

If I press F5 in VS Code (just as you would in Cache Studio) in order to view a csp page when I press F5 in vs code it tries to open

http://localhost:57772/csp/bootstrap/

without the csp page name

If I add the csp page name in the url it works. The question is how do I link the csp page to the url passed to the browser

Nigel

Comments

Dmitry Maslennikov · Oct 4, 2020

You can use property "links" in "objectscript.conn", to add some links to your projects, which you will be able to open quickly

  "objectscript.conn": {
    "active": true,
    "username": "_system",
    "password": "SYS",
    "ns": "MYAPP",
    "port": 52773,
    "links": {
      "MyApp": "http://${host}:${port}/csp/${namespace}/main.csp"
    }
  }

After this, you will get a new item in the menu shown by click on the status bar with connection info.

0
Nigel Salm  Oct 5, 2020 to Dmitry Maslennikov

Thanks Dimitry

0
Joel Solon  Jun 9, 2021 to Dmitry Maslennikov

The popup help for "links" states "Several ${...} substitution symbols are supported in the value." Is there a list somewhere of what is supported? I tried ${file} but that didn't work.

0
Joel Solon  Jun 9, 2021 to Dmitry Maslennikov

Thanks Dmitry. I added this, which will launch the current class if it's a Zen page. Not perfect, but fun!

"links":{"Launch Zen page": "http://${host}:${port}/csp/${namespace}/${classname}.cls"

0
Michael Davidovich · Apr 11, 2022

I have implemented @Dmitry Maslennikov's solution below, but I wonder @Nigel Salm if you'd had success with any of those extensions to specify pages to open in browsers.  If you search the extension library for "open in browser" many, many options come up but they all seem to focus on HTML pages.
 

0