Nigel Salm · Oct 4, 2020

How to run a CSP page in VS Code


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


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


2 640
Discussion (6)1
Log in or sign up to continue

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.

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.

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"

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.