Debugging server side scripts in 5.8

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Debugging server side scripts in 5.8

#1

Postby Segi » Wed Jun 10, 2020 11:23 pm

I see that this feature was added in 5.8

I read the documentation in /ufs/doc/Script_debugging.htm#_Debug_View_Frame and this is what I have done on my development server to attempt to debug a script. My dev server is the one running Verj 5.8.

1. Made sure that embedded server is selected at the top right
2. Click on the Debug icon which opens the debug view
3. Added a break point to the before page script and a script called when you click on a button on my form
4. The breakpoints that I just added are visible in the breakpoints panel
5. Log into our Intranet and load this form.
6. I expected the execution to stop because of the breakpoint or when I click on the button but neither of which stops execution

What am I doing wrong ?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: Debugging server side scripts in 5.8

#2

Postby Jon » Thu Jun 11, 2020 9:36 am

Hi Segi,

You are debugging against the server selected in the top right - this is the "test server". So if you're using the embedded server, submit the form from the studio and it will run on the embedded server and the breakpoint should fire.

To debug your intranet server, you first need to configure this as a test server in File > Preferences > Servers under On-premise Servers. To do this you will need a user defined on the server using the Server Admin App with the DESIGNER role - this role is new to V5.8. Having configured the server, you then select it in the dropdown in the top right-hand corner of the studio. A word of caution: if you debug against a live server, the breakpoints will fire for all users, not just your session.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Re: Debugging server side scripts in 5.8

#3

Postby Segi » Thu Jun 11, 2020 3:08 pm

Jon,

That is exactly what I am doing. I am using the test server.

I am clicking on the play button in Studio to invoke the form. When it launches it redirects me to a login page. After logging in, I go to the form that I want to debug (by selecting it from the user menu) but it never pauses execution on the breakpoint
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: Debugging server side scripts in 5.8

#4

Postby Jon » Thu Jun 11, 2020 3:46 pm

If you look at the debug icon in the toolbar of the Debug View, does it have a green tick against it?
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Re: Debugging server side scripts in 5.8

#5

Postby Segi » Thu Jun 11, 2020 4:15 pm

Jon,

I discovered the problem. Clicking on the blue Play icon in Studio is not enough to invoke the form. You have to actually click on the arrow to the right of the play button and select the specific form.

I had another issue which I fixed and wanted to mention in case anyone else runs into this.

As I mentioned, I am using the test server. When I invoked a form that runs a DB query, I was getting an error that my database connection doesn't exist.

I fixed it by copying the DB connection files from the server at the path VerjIOData\apps\ufs\ebaseConf\databases to the location where I'm running studio at the path Studio\embeddedServer\initData\app\ebaseConf\databases

I also found that if you have any JSP that your application depends on and looks for in your webapp root, you need to copy them to Studio\embeddedServer\webapp which is the web app root for the embedded server.

Everything seems to be working fine with the embedded server now
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: Debugging server side scripts in 5.8

#6

Postby Jon » Thu Jun 11, 2020 5:02 pm

Glad it's working OK. Your other problems sound like normal server configuration tasks. You don't have to use the embedded server if you don't want to; it will work fine with a standalone server instance, so long as both the studio and server point to the same workspace.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Re: Debugging server side scripts in 5.8

#7

Postby Segi » Thu Jun 11, 2020 5:41 pm

Jon,

Our production server is not running 5.8 though so I won't be able to debug scripts using anything but the embedded server right ?

Just to be clear, our dev server is the one that I upgraded to 5.8 and our production is still on 5.6
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: Debugging server side scripts in 5.8

#8

Postby Jon » Fri Jun 12, 2020 8:13 am

Both studio and server must be V5.8 or higher. So you could debug against either the embedded server or your V5.8 dev server, but not the V5.6 prod server.
0 x


Who is online

Users browsing this forum: No registered users and 8 guests