#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 Matthew Martinez · Dec 2, 2019

Hello,

I am reading in an X12 document into my production that needs to be processed and returned as a CSV file.  I have created a record map to support the fields I want to extract with a batch class to store headers.  I have a DTL mapping the data to the appropriate fields in the record map and am sending the record map to a EnsLib.RecordMap.Operation.BatchFileOperation.

None of my components error out and in fact report that the message was processed without any errors but I am not getting an output file in my expected output folder. 

2
0 1003
Question Matthew Martinez · Dec 2, 2019

Hello,

I have a record map and batch class being passed to an EnsLib.RecordMap.Operation.BatchFileOperation.

They are designated as INFORMATION.FPL.Record and INFORMATION.FPL.Header

After reaching the operation it errors out with this message : ERROR <Ens>ErrGeneral: Quitting with error on Message body 5@INFORMATION.FPL.Record / 54 because Status 'ERROR <EnsRecordMap>ErrNoBatchParent: Record with class 'INFORMATION.FPL.Record' and Id '54' doesn't belong to a batch' matched ReplyCodeAction 1 : 'E=F' resulting in Action code F

Some screen grabs are attached of my configuration.

1
0 615
Question Đặng Phú Lộc · Nov 15, 2019

Hi everyone,

I've encountered this annoying issue so many times before, if any one also encounter this issue, please share here if you have any solution.

So, I've been working on a web service project using HealthShare 2015. Sometimes I have to set a debug target to a csp file to debug it. If I pause the debug process about 3 minutes above or so (to examine an object, variable, etc..) the studio will hang.

4
0 570
Question Tom Van Oosterwyck · Dec 3, 2019

Hello,

I have a couple of IOT devices that communicate via WebSockets to our backend.

I successfully managed to create a websocket connection between server and (iot)client using %CSP.WebSocket
However I would like to implement authentication on this using the HTTP headers at the same time of Connection: Upgrade.

I tried to set the headers to globals in order to debug but they are always empty.

Example code: 

1
0 326
Announcement John Murray · Sep 20, 2019

In time for InterSystems Global Summit 2019 we at George James Software are pleased to offer a cloud-hosted evaluation environment where you can work with Serenji in Visual Studio Code, editing and debugging ObjectScript in a sandbox running InterSystems IRIS 2019.3 Community edition.

You can do it all from your web browser. Nothing will be installed on your workstation, nor will any settings have to be changed on it.

To take Serenji for a test drive please visit https://georgejames.com/dc-gitpod

2
1 385
Question Arto Alatalo · Nov 1, 2019

All of the sudden, Cache Studio's Debug->Run command started to fail with error '6704 Target has exited debugger' (German: Kein Anbinden möglich). What could be a reason of that? Today we installed Cache Web Terminal (https://intersystems-community.github.io/webterminal/
), could it be possible that the terminal somehow hijacked some debugging api end-point?

Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.2

Update: any idea what error 6704 means exactly? Studio was able to launch debugging job but it unexpectedly exited? German text seems is trying to say "Can't connect"

5
0 516
Question Ting Wang · Oct 8, 2019

Hi,

I got the <INVALID OREF> error in the component and the error screenshot as follows:

​​​​​​

When I try to debug in the code, I go to the class and view other code in eclipse and find out the error method. How should I determine which line threw the error according to the error? There is the line number"+8" in zProcessRequest method. Is that the line counted from the method name or below? Looking forward to your reply. Thanks.

4
0 1357
Article Ben Spead · Sep 30, 2019 2m read

Every developer has made the mistake of accidentally leaving temporary debug code in place when they meant to remove it after debugging is complete.  The great thing about writing in ObjectScript is that there is a way to make temporary code be truly temporary and automatically self-destruct!   This can also be done in such a way that the code has no change of making it into your source control stream, which can be helpful as well.

1
0 470
Announcement John Murray · Sep 6, 2019

We've just published an update to the Serenji extension for VS Code. Starting with this version (3.0.7) you can now debug the code that implements your REST services. Here's a taster:

Read more about Serenji on Open Exchange.

0
2 533
Question Dmitrii Kuznetsov · Sep 1, 2019

OAuth server to be deployed on the IRIS learning cloud platform. Clients - one on the other instance of the learning IRIS server, the other client locally on my computer in the container docker.

Both clients get a seemingly correct link (through ##class(%SYS.OAuth2.Authorization).GetAuthorizationCodeEndpoint()) to the login request form:  

3
1 1022
Question Daniel Lee · Jul 16, 2019

I am fairly new to Cache and ObjectScript. I have a new task I have created with a corresponding method that I am trying to debug in Studio (2013). 

My ClassMethod looks like this

ClassMethod DoMyWork(Output pWorkCount as %Integer,  pInput1 As %Integer = 30)

{

/* Does some work here and increments pWorkCount */

}

When I try to debug this using studio, I  browse to my method but I am not certain what to put in here for the input parameter 'pWorkCount'.

I tried to execute the class in the terminal window but I am not sure how to enter debug mode using the terminal window. 

Thanks.

3
0 883
Announcement John Murray · Apr 1, 2019

We at George James Software are pleased to announce that our acclaimed code debugger and editorSerenji is now available as a Visual Studio Code extension.

As well as supporting the latest InterSystems IRIS platform Serenji also works with earlier platforms, including versions lacking the server-side Atelier API support required by other VS Code extensions.

Serenji connects you directly to the code in your namespaces, resulting in an experience more familiar to existing Studio users. No need to export and import classes and routines.

13
3 1395
Article Stephen De Gabrielle · Jun 26, 2019 1m read

This is more for my memory that anything else but I thought I'd share it because it often comes up in comments, but is not in the InterSystems documentation. 

There is a wonderful utility called ^REDEBUG that increases the level of logging going into mgr\cconsole.log. 

You activate it by

a) start terminal/login

b) zn "%SYS"

c) do ^REDEBUG

d) change logging level to FFFFFFFF

0
1 1487
Question Rueben Van Mol · Mar 14, 2019

Hello,

Last weekend we've updated our Caché version to 

Versie: Cache for Windows (x86-64) 2018.1.1 (Build 312U) 

I'm using Studio to develop. I've been using the built-in debugger and it has been working nicely. But now, since the upgrade, I'm getting this error when trying to debug any routine or class method:

Executing ##class(Blue.App.Handler.Adsolut).TestConnection()
<COMMAND>zDebugStub+30^%Debugger.System.1

This is the code for the classmethod I got the error on;

Class Blue.App.Handler.Adsolut Extends %RegisteredObject
{
ClassMethod TestConnection()
{
  w "ok"
  q
}
}

11
0 1072
Question Laura Cavanaugh · Feb 5, 2019

Our development server is set up to automatically keep the .INT code of compiled classes and routines, but the live servers are set to not keep the .INT code.

I know how to set the system to keep this code ($SYSTEM.OBJ.SetQualifiers() ?)  but what are the ramifications of keeping this code on the live servers?  Is it just a space issue?  I always thought it was to keep the code more private.

4
0 676
Announcement John Murray · Jan 14, 2019

At the George James Software booth at Global Summit last year we took the wraps off the work we've been doing to make our popular editing and debugging tool Serenji available on the Visual Studio Code platform.

Rather than requiring you to pull code from your namespaces into local files, then push the changes back to the namespace to run it, you work directly in the namespace. In other words, the editing experience is like Studio rather than like Atelier.

As well as editing code you can also debug it directly from VSCode.

12
1 879
Question Sean Connelly · Dec 20, 2018

I've been looking at the idea of developing a Time Travel Debugger utility.

It would take a debug target and have a few options such as stack depth and disclude system code.

The debugger would either be started from an external tool, or triggered from a line of code inserted into a method that I want to record.

The debugger would execute the code from start to end and record the full stack on each step to the configured depth.

A visualisation tool would provide a set of controls to play the recording forwards and backwards and provide various ways to search and jump to points in the recording.

4
0 507
Article Sergei Sarkisian · Oct 1, 2018 4m read

Not everyone knows that InterSystems Caché has a built-in tool for code profiling called Caché Monitor.

Its main purpose (obviously) is the collection of statistics for programs running in Caché. It can provide statistics by program, as well as detailed Line-by-Line statistics for each program.

Using Caché Monitor

Let’s take a look at a potential use case for Caché Monitor and its key features. So, in order to start the profiler, you need to go to the terminal and switch to the namespace that you want to monitor, then launch the %SYS.MONLBL system routine:

zn "<namespace>"
do ^%SYS.MONLBL
1
7 1116
Question Mike Dawson · Oct 10, 2018

I just downloaded and installed the latest WebTerminal into my local copy of Healthshare 2016.2.1

I installed via studio and everything compiled without error.

However when I run it I just see a black screen. The help window at the bottom of the screen pops open when I type '/' but I just can't get any response.

Any suggestions as to how to trouble shoot this?

Mike

11
0 665
Question John Murray · Oct 2, 2018

Using our cool new debugging extension for Visual Studio Code I'm trying to debug a CreateProjection method of a class, but when I compile it the work apparently gets done in one of the worker jobs, so my breakpoint never triggers.

Is there a compiler flag or qualifier to force the compilation to be done in-process rather than getting handed off to a worker job?

4
0 516
Announcement John Murray · Sep 21, 2018

If you are attending Global Summit 2018 please be sure to say hello to George James Software in the Partner Pavilion.
You are also invited to the informal lunchtime meeting we're hosting at Global Summit on Tuesday 2nd October from 1pm in Indian Paintbrush, a meeting room at the conference venue. We will be previewing the next versions of Deltanji, our integrated source code management solution, and Serenji, our editor and debugger.

0
0 383
Question Eduard Lebedyuk · May 22, 2018

The code I'm researching loosely follows this flow:

  1. My first callback
  2. Black box
  3. My second callback

I can modify 1 and 3 no problem but modifying 2 is difficult.

However I think that step 2 has some optimization problems, namely:

  • instantiates lots of objects
  • throws/catches lots of exceptions (not logged)

Is there a way to count these two metrics?

3
0 299
Question Malcolm Needham · Jan 17, 2018

Hello all, I created a web service and I am trying to access it using SoapUI but I get this error:

<text>ERROR #5002: Cache error: &lt;PROTECT>zGetMsgClass+3^%SOAP.WebService.1 ^oddCOM("TestWeb.Service.TestWebSoap",85,"P",0,"soapAction","http://127.0.0.1/csp/dev5/Utils.TestWebService.testNow"),h:\dev5\</text>

It appears to be trying to make an entry in the ^oddCOM global, but is getting a PROTECT error. 

I also tried a .NET app where I added the service using the WSDL. In .NET I get "Internal Server Error" so I'm assuming it's the same error.

Any ideas welcome. 

Thanks, Malcolm.

3
0 776