How to debug a Servoy app

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

How to debug a Servoy app

Postby 258.d.852 » Thu Nov 30, 2023 2:54 am

Dear all,

it might be a stupid question, but I also need to ask: How can I debug my Servoy app?

Right now, my Servoy Developer version is 2023.3.3.3845_LTS, running on a Windows machine.

I navigated to Run on menu bar, but the selection for debugging is inactive like in the picture

2023-11-30 01_48_57-blog-code-not - Servoy Package Manager - C__workspace_projects_blog-code-not - S.png
2023-11-30 01_48_57-blog-code-not - Servoy Package Manager - C__workspace_projects_blog-code-not - S.png (12.31 KiB) Viewed 1499 times


Is there any ideas for this problem?

Thanks
258.d.852
 
Posts: 9
Joined: Wed Jul 12, 2023 1:10 pm

Re: How to debug a Servoy app

Postby swingman » Thu Nov 30, 2023 8:41 am

Hi, those menu options are for older Servoy client types.

You need to switch to the Debug perspective in Eclipse.

There is a row of icons small icons for switching perspectives in the top right corner of the main Window.

When you launch a client from developer it will stop at the breakpoints.

Hope this helps,
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: How to debug a Servoy app

Postby mboegem » Thu Nov 30, 2023 10:31 am

Hi,

Just to add to what swingman explained: basically the 'Launch NGClient / NGDesktop Client' are named inconsistent.
Every client launched from developer is a debug client (only 1 at the time), this is why Servoy Developer will kill a previous NGClient browser session when you launch a new one.

For NG, if you need multiple sessions in order to test for example data broadcasting, you can launch up to a total of 5 sessions (including debug client session) by adding 'nodebug=true' to the url
Something like this:
Code: Select all
http://localhost:{PORT_NUMBER}/solutions/{SOLUTION_NAME}?nodebug=true

depending on the version NG / TiNG, 'solutions' might also read 'solution'
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1724
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: How to debug a Servoy app

Postby hilgers » Thu Nov 30, 2023 11:22 am

in addition to Marc's tip:
you can add menuitems, buttons... to your application when application.isInDeveloper()
so that you can launch easily multiple nodebug clients without the need to fiddle with URLs

Code: Select all
function runNoDebugClientTi() {
   application.showURL(application.getServerURL() + 'solution/' +application.getSolutionName()+ '/index.html?nodebug=true');
}

function runNoDebugClientNg() {
   application.showURL(application.getServerURL() + 'solutions/' +application.getSolutionName()+ '/index.html?nodebug=true');
}

Joachim Hilgers
Hicosoft GmbH
Cologne, Germany
hilgers
 
Posts: 12
Joined: Wed Feb 15, 2012 1:29 pm
Location: Cologne / Germany

Re: How to debug a Servoy app

Postby 258.d.852 » Thu Nov 30, 2023 11:12 pm

Thanks guys! You, guys shed some light to me!
258.d.852
 
Posts: 9
Joined: Wed Jul 12, 2023 1:10 pm


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 3 guests