cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Improvement to service / script code editor

Improvement to service / script code editor

Services are harder to debug due to lack of debugger to step through code.

 

This a standard component for programming / development in any IDE. Having this feature would reduce complexity of debugging code and make development faster.

 

 

 

An alternative solution to this problem is integrating composer with VS code so that editing a service opens a VS code window. Similar to how Unity is integrated with Visual studio. In Unity all UI development is done in Unity and writing code is done in visual studio.

 

This would be a more holistic approach that brings the best of both worlds in combining composer with a standard IDE to get a more robust development experience.

8 Comments
berkob
8-Gravel

Agreed. In addition, better linting would dramatically reduce bugs.

Radu
15-Moonstone

It is currently possible to use Monaco Editor to augment VSCode in your Thingworx coding environment.

 

Install TamperMonkey browser extension.

Install Monaco Editor (https://github.com/ptc-iot-sharing/MonacoEditorTWX)

Add the following script to TamperMonkey

 

// ==UserScript==
// @Name         Load Monaco Remote
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Loads the monaco editor in the new composer
// @author       You
// @match        */Thingworx/Composer/*
// @grant        none
// ==/UserScript==
var script = document.createElement("script");
script.src="/Thingworx/Common/extensions/MonacoScriptEditor/ui/MonacoScriptEditor/newComposer.bundle.js";
script.charset = "UTF-8";
document.getElementsByTagName("head")[0].appendChild(script);

 

cbaldwin
13-Aquamarine
Status changed to: Under Consideration

We have some work we are evaluating in this area.

olivierlp
Community Manager
Status changed to: Under Consideration

A design time environment is under consideration for IDE integration

jensc
17-Peridot

Any progress update on this? I see this has been under consideration for over a year now.

rogerjn
11-Garnet

I agree. I have been using the Monaco Editor with Tampermonkey, and yes, it is a LOT better than standard editor, BUT, it still lacks support for debugging which is something EVERY code developer requires.

As it is now debugging is more like trial and error which is very time consuming.

jensc
17-Peridot

Hello,

 

I've started using Monaco Editor as well recently and as others here say it is certainly an improvement upon the standard editor.

But as there are some security concerns I doubt my company would want more developers to start using it.

 

So, @olivierlp,@cbaldwin, is there any news on this? I think plenty of people developing on thingworx would like to have an update.

atiwari-4
12-Amethyst

Hello Community users,

Thanks for the ideas and suggestions on this critical topic!

After further investigation, we decided to not consider Monaco editor for several reasons around cost, performance, security, and a lack of robust debugger functionality.
We do have plans to move the current underlying ThingWorx platform JavaScript engine from Rhino to GraalVM as part of the CY 2024-25  roadmap and we plan to provide debugger capabilities post that effort as part of our long-term roadmap. 

 

Regards,

Ayush

Director, ThingWorx Product Management