#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 Hannah Sullivan · Aug 14, 2024

If anyone has experience debugging Embedded Python or has insight into why an ObjectScript method when called from a Python method would not work but would work when called directly via ObjectScript or in a Python shell, your help would be appreciated! 

We have an ObjectScript ClassMethod called GetTemplateString() which takes in a templateName of String type and uses the template name to get the template object, access the Code, and read the code into a templateString. The string version of the Code is returned.

0
0 0
Question Colin Brough · May 18, 2023

Is CR/LF changes to DTL files edited/committed to git via VS Code a known issue?

We had an issue with exporting files from one server and importing on another, using XML code exported from Studio: ERROR #6301: SAX XML Parser Error. Turns out that issue was down to CR/LF changes made when transferring the XML from one server to the other.

2
0 327
Article Ray Fucillo · Dec 1, 2023 13m read

When there's a performance issue, whether for all users on the system or a single process, the shortest path to understanding the root cause is usually to understand what the processes in question are spending their time doing.  Are they mostly using CPU to dutifully march through their algorithm (for better or worse); or are they mostly reading database blocks from disk; or mostly waiting for something else, like LOCKs, ECP or database block collisions?

0
2 482
Article Katherine Reid · Apr 24, 2019 5m read

The %Net.SSH.Session class lets you connect to servers using SSH. It's most commonly used with SFTP, especially in the FTP inbound and outbound adaptors.

In this article, I'm going to give a quick example of how to connect to an SSH server using the class, describe your options for authenticating, and how to debug when things go wrong.

Here's an example of making the connection:

Set SSH = ##class(%Net.SSH.Session).%New()
Set return=SSH.Connect("ftp.intersystems.com")​
4
1 6626
Question David Marinkovic · May 21, 2024

  

Hi guys,

I need to check my HTTPS POST REQUEST, in order to do this I try to catch it by using wireshark.

I can't see anything because of the encryption.

I try unsuccefully to use the SSLKEYLOGFILE key (windows 11), but the generated file did not increase when I trigger my code OR postman, it grows only by the action of the web browser.

My question is so simple :

1°) How have a clear view of the HTTPS request from IRIS code in wireshark

2°) Why the keylog file did not increase when trigger the code from IRIS ?

0
0 392
Question Nigel Salm · Apr 21, 2021

Hi

How do I view the .int code of a compiled class in VS Code?

I am trying to use gj::Locate and the setup works, the explanation is all fine but when i paste an error from the Error Logs into the gj::locate it firstly tells me that it can't find the .cls and when I paste in the .int reference in the text box where you can specify the class, method, line+offset it replies that it can't find the item.

This is something to do with the objectscript extension rather than gj::locate

Nigel 

3
0 721
Question Colin Brough · May 9, 2024

We have a custom business service that is triggered by a scheduled task. The service queries a table, iterates over the result set and sends a message on to a business process for each result. Happy path functionality is all fine.

However, when there is an error detected in the business service code, neither throwing an exception nor returning an error %Status behaves as we'd expect.

0
0 141
Question Andy Stobirski · May 1, 2024

Hi Guys

Two of the HC servers I manage (a mirrored pair) have lost the ability to debug code, and I am unsure as to why this has happened. Clearly something has changed, as the other three are working just fine.

When I select a Class Method as debug target, add a few break points and run it, I get the following Output

Debugger executing '##class(InPhase.Test.CanUpdate).TestBIU()'
Executing ##class(InPhase.Test.CanUpdate).TestBIU()

<COMMAND>zDebugStub+40^%Debugger.System.1

Program has terminated.
Target has exited debugger
0
0 187
Question Nimisha Joseph · Feb 29, 2024

I'm facing an issue while converting an ORU_R01 HL7 message to XML, specifically with the <pidgrpgrp> kind elements. When I use the getvalueat() method before conversion, the XML includes the <pidgrpgrp> and other <grp> elements, but when I don't use the getvalueat() method, the XML is generated without these <grp>elements.

I've attempted to debug the issue using zwrite on the HL7 message before and after calling getvalueat(). Before calling it, the content appears different, and after calling it, the content shows buildmap=1, etc.Please see the xml generated in 2 cases.

0
0 185
Article Heloisa Paiva · Mar 15, 2024 5m read

Introduction

In the next few weeks, my coworkers are planning to start using VSCode to code with InterSystems' products. Among the many advantages of that, I would emphasize being able to connect with other technologies, such as GitHub, with ease. Besides, VSCode also offers an extensive extensions store, where you can find many free add-ons that make coding faster and more efficient. Last but not least, to conquer the heart of every developer, it is open source.

With that being said, let's start the tutorial. Feel free to skip some steps if you're comfortable doing them alone.

0
0 739
InterSystems Official Raj Singh · Feb 20, 2024

I recently realized it's been far too long since I talked about the latest features in the InterSystems ObjectScript Extension for Visual Studio Code. 

I'm pleased to announce version 2.12.1 of the ObjectScript extension, containing a number of enhancements that make a developer's life easier. Some highlights are described below, including the #1 requested feature from Global Summit -- XML import! 

As always, find the full list of modifications in the CHANGELOG, including many bug and vulnerability fixes.

Cleaner user interface

0
0 468
Question Colin Brough · Feb 13, 2024

Does the GetValueAt method of an EnsLib.HL7.message object change the contents of the HL7 message?

We want to do two things, given an incoming HL7 message, in our production:

  • transform the HL7 to XML, where the class TNHS.Utils.HL7toXML provides the same methods as, for example, EnsLib.HL7.Util.FormatSimpleXMLv2:
    set sc = message.OutputToLibraryStream(xmlstream,"","","TNHS.Utils.HL7toXML")

     

  • extract a value from a particular field in the message: 
    Set ReportId = message.GetValueAt("PIDgrpgrp(1).ORCgrp(1).ORC:3.1")
0
0 406
Question Kurro Lopez · Feb 7, 2024

Hi community.

Yes, I know that there is other question "VS Code - debugging doesn't work" that is the same issue, but my IRIS instance is not using IIS.

Some times ago, I could debug without problems, but after some updates of Visual Studio, I get the following error

Failed to start the debug session. Check that the Intersystems server's web server supports WebSockets

I've activated the WebSocket protocol in the server (Windows Server 2019) but it still doesn't work.

The IRIS instance is not using IIS, I think it is using the Apache by default.

Do I need to do anything in special?

3
0 212
Question Colin Brough · Oct 17, 2023

Pointers please for debugging a SOAP web-client.

We have several clients in different productions all accessing a web-service. We are trying to add another client in a new production, and its not working. The messages between the relevant Process and the SOAP web-client Operation are the same in the working and the non-working productions. But the web-service is reporting an XML parsing error to the non-working production. Here's the error as reported in the SOAP web-client Operation...

Is there any way to see the output of the web-client Operation - what Ensemble is actually sending out?

3
0 348
Question Evan Gabhart · Oct 5, 2023

I am currently debugging a piece of code relying heavily on macros. I am using breaks in the method to then check the values of macros and object properties as I go. However, any time I invoke a macro within a break I get an error. To get around this I am converting the macro calls into the underlying code. Some of these macros have messy translations and this is somewhat time consuming. Is there an easier way to access macros from within a break?

5
0 254
Article Ariel Glikman · Aug 28, 2023 3m read

With the world (as well as our own technology) moving to the cloud at such a fast pace it is easy (at least for myself) to get caught up in the little details. One thing I, and some clients of ours, had run into a couple of times was the necessity to specify the version of the images one plans to use with the IKO.

4
1 456
Question Donna Edwards · Jun 30, 2023

Hi I am trying to run a debugger in VS Code.  I have the settings.json file and the launch.json file.  I am trying to debug code using the attach to a process method, however when I run the debugger I get the following error. 

Launch.json code 

{

    // Use IntelliSense to learn about possible attributes.

    // Hover to view descriptions of existing attributes.

    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387

    "version": "0.2.0",

    "configurations": [  

        {

            "type": "objectscript",

            "request": "attach",

1
0 418
Article Pietro Montorfano · May 23, 2023 3m read

Intro

If you ever wondered how to debug some requests that are being made to or from IRIS, well here is a little tutorial on how to do that.

During a complex project, usually you get the specifications and implement the communication between IRIS and other things based on that. But from the paper to the real world there's usually a huge gap and you need to know why you are receiving an error on a parameter, on a header, you are not receiving the data and so on.

1
2 544
InterSystems Official Raj Singh · Feb 27, 2023

I'm pleased to announce version 2.6.0 of the VS Code ObjectScript extension, containing a number of enhancements that make a developer's life easier. Some highlights are described below. As always, find the full list of modifications in the CHANGELOG, including many bug and vulnerability fixes.

Switch namespaces quickly

Thanks to @Olli Tanskanen at partner company JediSoft Oy for this enhancement! You can now switch namespaces from the Server Actions menu (when using client-side folders only).

Fast, asynchronous server-side search

15
1 812
Question Colin Brough · Apr 5, 2023

Exported contents of a namespace on one server (classes, include files and lookup tables). Importing that code into a newly created namespace on another server. Both servers Ensemble 2018.1, same build. Export was via InterSystems Studio. Export is around 18Mb in total (XML file sizes).
When importing and compiling on the new server, getting errors as below - with #6301: SAX XML Parser error prominent - on a number of the imported files, all containing data transformations or business processes.

1
0 753
Article Eduard Lebedyuk · Apr 17, 2017 4m read

In this article I'll cover testing and debugging Caché web applications (mainly REST) with external tools. Second part covers Caché tools.

You wrote server-side code and want to test it from a client or already have a web application and it doesn't work. Here comes debugging. In this article I'll go from the easiest to use tools (browser) to the most comprehensive (packet analyzer), but first let's talk a little about most common errors and how they can be resolved.

2
5 3803