1. Damien Dube
  2. PowerBuilder
  3. Friday, 12 February 2021 14:01 PM UTC

Hi ! I don't know if anyone else on the PowerServer 2021 beta could answer this:

 

How do I debug the "client" app that is produced and launched by the web app launcher ?

 

I am having a hard time deploying our app to PowerServer right now, it shows our SplashScreen and crashes immediately when trying to connect to the database.

 

From what I understand about the PowerServer project in PB and what I have observed in the WebAPI console, it seems like we have to specity a Database profile for each named Transaction variable in our code?

 

 

Damien Dube Accepted Answer Pending Moderation
  1. Friday, 12 February 2021 16:12 PM UTC
  2. PowerBuilder
  3. # 1

Hi Armeen,

Thanks for you reply. However, to answer a few of your own questions:

 

We are using SQL Anywhere 17 databases for our PowerServer deployment test.

I already figured I need to configure all possible Database connections (caches), then assign a cache to each named variable of Transaction type (or any type inherited from the Transaction type) that is used in our app.

We are using SQLCA as our primary transaction object, but we have plenty of others for various situations (we connect to more than one database, and one of these uses remote objects from another database so we have temporary transactions set up for these exchanges just in case the remote server isn't available - which causes the transaction to crash). Regarding this, I have a suggestion for the whole "DB cache association" thing in the WebAPI part of the project - It would be nice if we could assign caches to Transaction types rather than variable names. Ie we are using specific inherited transaction types for each specific Database we need to acces in our app, but as some of them are temporary, we do not always declare them as Global variables. This gave me headaches for the first 2 days / my first attempt to deploy our app to PowerServer.

I am currently using the WebAPI console to track my errors but I think a Debug mode would still be a great feature, for all PB apps are not simple "Sales" projects.

We have all kinds of complexities in our app, we use everything we can out of the native PowerBuilder features, and we build more things and workarounds on top of it through various ways (external DLLs / dot NET assemblies / REST APIs, etc.) and we sometimes make Datawindows using system procedures in the SQL Anywhere databases (ie sa_conn_info) - This doesn't seem to work well in PS.

I am disabling certain parts of our code and slowly documenting things that may not be supported by the PowerServer app at the moment. I will then give a 2nd glance to the list and decide which features are essential / should be removed because of the web app context.

 

 

Comment
  1. Armeen Mazda @Appeon
  2. Saturday, 13 February 2021 00:08 AM UTC
Hi Damien,

There are two ways to do the "DB cache association"... you can statically map it in the PowerServer project config or you can programmatically switch which DB cache the particular transaction object should use. So I think you can accomplish what you want to do but you need a different technique.

If you don't mind, I'd really appreciate if you open a support ticket and submit code sample of how you are doing the transactions so at least we can make adjustments that PowerServer correctly reports this as an unsupported feature and doesn't crash. Also, anything else you discover is unsupported please report it to us in a support ticket so in the final release we can make sure to properly handle reporting these.

Don't worry, the debugger is coming... it is scheduled for PowerServer 2022 per our product roadmap: https://www.appeon.com/developers/roadmap#upcoming

Best regards,

Armeen
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 12 February 2021 14:36 PM UTC
  2. PowerBuilder
  3. # 2

Hi Damien,

You can use the PB debugger to debug that your PowerScript is correct.  There is no runtime debugger to identify bugs in the Appeon product itself.  

With that said, once we are out of beta and the product is stable, I think you will find not so much need for this.  But we do have it on our roadmap to add this to the next version of PowerServer.

There are some troubleshooting steps you can try:

1. Verify you are using supported database.  For this beta version only SQL Server, Oracle, and SQL Anywhere are supported.

2. In the Web API tab of the PowerServer project object in PB IDE, make sure you have defined a DB connection, that the connection tests successful, and that you have mapped SQLCA to that in this config screen.

3. Then in the general tab of the PowerServer project object in PB IDE, set it to “Full” build and generate the whole project.

4. Open in C# portion of the generated app in SnapDevelop and do a compile.  Look for any syntax/compilation  error messages. 

5. Test that the Web API is working and returns JSON data.  My guess is The Web API is not working so that’s why your app freezes.

6. If the Web API is working correctly and your app still crashes, please open a support ticket.

Best regards,
Armeen

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.