#Debugging

0 Followers · 168 Posts

Debugging is the process of finding and resolving defects or problems within a computer program that prevents the correct operation of computer software or a system.

Question Colin Brough · Apr 20, 2023

On a developer's laptop, having had two or three Ensemble installs with different settings/config changes made, and encountering unexplained errors compiling classes, wanting to scrub as much of the previous installs off the machine before doing any fresh installation... But can't find clear documentation on doing a complete uninstall!

Have stopped the server.

Am I safe to remove C:\InterSystems\Ensemble (for the instance installed into that folder)?

What other files/Registry/locations contain references to an Ensemble install, and are there tools or documentation on clearing those out?

6
0 578
Article Yuri Marx · Sep 26, 2022 9m read

Visual Studio Code (VSCode) is the most popular code editor on the market. It was created by Microsoft and distributed as a free IDE. VSCode supports dozens of programming languages, including ObjectScript, Until 2018, Atelier (based on Eclipse). It was considered as one of the main options to develop InterSystems products. However, in December 2018, when the InterSystems Developer Community launched support for VSCode, a relevant portion of InterSystems professionals started actually using this editor and have been doing it ever since, especially the developers working with new technologies

4
6 2142
Question Jordan Everett · Mar 13, 2023

Hey all!

I was wondering if anyone had any input on how to troubleshoot classes in a terminal session? I'm currently writing an "adapter" so that way we can encrypt and decrypt files through GNUPG (PGP keys).

I currently have a %RegisteredObject class for this and am running into the excruciating pain of testing this. Every time I make a change on the RegisteredObject I have to renew the class and all of its properties in order to test the newly compiled code that I have written. I know that this doesn't seem like too much of a hassle, but after doing it multiple times it becomes tiring.

3
0 412
Question Colin Brough · Feb 15, 2023

Is there a way of comparing code running on two Ensemble servers - ideally excluding certain types of difference?We are a new team working in HealthCare (lots of HL7, some web-services). As well as doing new development on local servers with suitable source control, we have a large code base we've inherited from an external supplier for which we have no log of versions or differences. We have a live server and test server - and we've stumbled across a couple of places where there are differences in logic in addition to the expected differences in endpoints. Is there any way of systematically

9
0 436
Question Jordan Everett · Dec 30, 2022

I am currently trying to better my development process by using Visual Studio Code because I'm more familiar and comfortable with it than Studio.

I've followed the guide here, but I'm still having issues. I initially didn't have the Web Socket protocol allowed on my Web Gateway server, but I enabled that and restarted the server with no luck.

Am I just on too old of a version? Is there any way I'd be able to use Visual Studio Code and be able to debug with what I currently have? I wish I could upgrade to IRIS, but that doesn't seem to be an option.

15
1 747
Question Evgeny Shvarov · Oct 8, 2022

Folks!

Could you please share any best practices on how to debug Embedded Python code?

Given I have the following class method:

ClassMethod HideShip() As %Status [ Language = python ]
{
    import iris
    shipsgl=iris.gref(iris.cls(__name__)._GetParameter("BoardStorage"))
    shipsgl.kill()
    from random import Random
    board=iris.cls(__name__)._GetParameter("BoardRange")
    x=random.randint(0,board+1)
    y=random.randint(0,board+1)
    shipsgl.set([x,y],1)
}

And when I run it shows the following error:

5
0 888
Announcement Laurel James (GJS) · Sep 20, 2021

Hi developers, 

We're excited to let you know about the latest release of Serenji, your on-the-spot debugger from George James Software. Version 3.2.0 focuses on the debug experience and introduces zero configuration for users. No matter where you are or what you're doing, Serenji is always ready to go in just one click, so you won't lose focus by spending time setting up a launch configuration. 

1
4 372
Question Zach McKinney · Sep 30, 2022

Issue

Breakpoints do not work when using VS Code Debug this method feature on a ClassMethod. Debug runs like normal and I can sometimes see 'running' on the CALL STACK menu. In the BREAKPOINTS menu, the breakpoints will start red, like normal, but eventually turn gray. On-hover for a grey breakpoint is the message "Breakpoint Cannot Be Mapped". After the method finishes, the breakpoint turns red again. No error messages appear. This is an intermittent issue, as sometimes it runs fine. So far, I have not been able to figure out the conditions to re-create this issue.

Any suggestions?

Edit: 

6
0 518
Question Jonathan Lent · Aug 4, 2022

I've faced a problem that happens while debugging a process in VSCode. It doesn't seem to matter if this is in a container, on my development VM, or against a locally installed version of IRIS. The problem seems to be mostly with X12 Documents.

So, in a debug session, I can dump out a value to the debug console and it loos correct. The same variable in VSCode appears to be some uninitialized memory location.

In the interactive debugger window:

In the Variables Window:

Host Workstation:

4
0 385
Article Fabio Goncalves · Jan 8, 2018 2m read

Hi Community,

I would like to share with you my experience regarding  to debugging via Atelier.

I'm developing a REST API and would like to attach to a process when I call the API via a REST Client tool, for example Postman. The purpose is to inspect values from HEADER and BODY of the HTTP request during the debugging process.

Come on! How am I doing? I am going to demonstrate that by using a class from SAMPLES namespace.

1 - Open Atelier;

2 - Open your REST Service class;

3 - Go to the method related to the URI that you need to debug;

3
0 1405
Announcement Laurel James (GJS) · Jun 16, 2022

Only a few days to go until the Global Summit! George James Software will be on hand to talk about any projects you may have on the horizon, such as application development, data and platform migration, system integration, training, and support – we can work with you to find practical and maintainable solutions that support the growing needs of your organization. 

We're also running a User Group Session on Wednesday, July 22nd at 12pm. It's a great opportunity to find out more about our tools and ask us (and current users!) any questions. 

0
0 185
Announcement Laurel James (GJS) · Jun 7, 2022

Come and say hi to us in the Partner Pavilion at the Global Summit! We’ll be showcasing our Serenji on-the-spot debugger which has undergone some big changes in the last year—users can now enjoy a seamless debugging experience with zero configuration, along with taking advantage of the latest features in VS Code itself, enabling users to smoothly identify and quickly fix errors in your code, contributing to the production of quality, maintainable code.If you want to see Serenji in action look for us in the Partner Pavilion, we'll be on hand to show you a demo.  Prospective users are also

0
0 230
Article Mario Sanchez Macias · Apr 27, 2022 3m read

From time to time, we get the previous question in support, something or someone is using more licenses than expected, and we need to find what. 

We have two scenarios. The first scenario is when we realize that the licenses are exhausted when the application does not work or when we try to connect through the terminal and get the "lovely"

<LICENSE LIMIT EXCEEDED> message: 

1
0 861
Question Lorenzo Scalese · Apr 16, 2022

Hi Community,

When we terminate a process that is in a transaction, the system (fortunately) performs a rollback.

As part of some troubleshooting, I'm wondering if there's a way around this behavior to avoid rollback (or force commit) before termination.

Recently we had an issue on a test server with a process stuck in a huge transaction (around 100GB).

The out-of-control process was suspended and then terminated causing a rollback.

In the case of a test server, this is not really a problem.

6
0 622
Question Jonathan Lent · Apr 15, 2022

While I love using VSCode for IRIS development work, one of the persistent frustrations with it has been the inability to display an object hierarch in the variables window while debugging. Only the object's reference identifier is displayed. Cache Studio's handling of the same issue is a little clunky, but it does at least have the option to display something as an object.

For now, I make do with a combination of the watch window and the command line in the debugging console -- but this feels just a step away from log.debug()/console.log() level debugging sometimes.

2
0 585
Article Evgeny Shvarov · Jun 13, 2016 1m read

Hi, Community!

Want to share with you one debugging approach from the Russian forum.

Suppose I want to debug the application  and I want it to stop the execution on a particular line.

I add in code this line:

l +d,-d

When I want to start debugging in this line I block d in terminal

USER> l +d

And execute the app.

The app stops on this line and lets me connect to it with Studio debugger.

To release lock I do in terminal

USER> l -d

And what are your debugging practices?

8
1 725
Question James Woo · Mar 17, 2022

SET ^||fruit(1)="apple",^||fruit(4)="banana",^||fruit(8)="cherry"
SET ^||fruit(1,1)="Macintosh",^||fruit(1,2)="Delicious",^||fruit(1,3)="Granny Smith"
SET ^||fruit(1,2,1)="Red Delicious",^||fruit(1,2,2)="Golden Delicious"
SET ^||fruit="Fruits"
ZWRITE ^||fruit

^||fruit="Fruits"
^||fruit(1)="apple"
^||fruit(1,1)="Macintosh"
^||fruit(1,2)="Delicious"
^||fruit(1,2,1)="Red Delicious"
^||fruit(1,2,2)="Golden Delicious"
^||fruit(1,3)="Granny Smith"
^||fruit(4)="banana"
^||fruit(8)="cherry"


How I do send the output of zwrite to $$$TRACE()?

4
0 710
Question Warren Grob · Oct 10, 2019

I am experiencing a problem with an EDI process that uses a SQL Batch Service to connect to our DEV environment.  However, when we point the EDI service to our TEST server, it errors out.

I have checked every single property on our TEST and DEV servers as well as the properties on the associated tables.  They are identical.  Nothing has changed in the SQL either. 

1
0 352
Article Laurel James (GJS) · Oct 25, 2021 2m read

InterSystems technologies are renowned for their high performing databases, which support the systems and operations of many organisations. However a key ingredient to this success is the quality and maintainability of their code. 

The quality of code can impact everything from speed and ease of fixing bugs and making enhancements, to the overall performance of your organization and your ability to get ahead in the marketplace. 

1
1 436
Question Arturo Masero · Nov 3, 2021

Hello,

I don't know if the title is accurate enough. I have a legacy code that I need to optimize. It's a routine written in objectscript. It accepts 4 parameters and runs 6 nested FOR...$ORDER reading a big global.

The thing is when I run the routine the first time it takes around 60 seconds to run. If I run it again it takes 5 seconds. If I wait around 6 to 10 minutes to run it again, it takes 60 seconds again, but if I run it every 1, 2, 3... minutes it still takes only 5 seconds to run.

9
0 591