Anybody having issue with web-debugging?

For questions about Gambas web tools.
Post Reply
crevilla
Posts: 7
Joined: Thursday 30th December 2021 10:22pm

Anybody having issue with web-debugging?

Post by crevilla » Friday 29th April 2022 11:06am

Hello,

A couple of days ago I got an update for gambas. Since then, when I press "play" in my web-project, instead of opening the browser using gambas internal web server, it just shows me the html text in the debug window below in the IDE.
¿Is it not possible anymore to test web apps?

However, if I compile and place the .gambas file in my htdocs directory, it plays nicely and does what it is supposed to do.

I feel more lost than a penguin in Vegas...
Dies ist kein Unterschrift.
Image

User avatar
cogier
Site Admin
Posts: 882
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Anybody having issue with web-debugging?

Post by cogier » Friday 29th April 2022 1:46pm

Can you post an example of your code?

crevilla
Posts: 7
Joined: Thursday 30th December 2021 10:22pm

Re: Anybody having issue with web-debugging?

Post by crevilla » Friday 29th April 2022 9:55pm

I used the pre-defined form that you get once you create a new web project. Nothing added.

Code: Select all

'Gambas class file
Export

Public Sub WebButton1_Click()
  Message("This is a message box.")
End

Public Sub WebTimer1_Timer()
  WebLabel1.Text = Format(Now, "hh:nn:ss")
End

Public Sub WebForm_Open()
  WebTimer1_Timer
End
Dies ist kein Unterschrift.
Image

User avatar
cogier
Site Admin
Posts: 882
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Anybody having issue with web-debugging?

Post by cogier » Saturday 30th April 2022 12:46pm

You need to switch on the HTTP server. From the Debug Menu select Configuration.. and turn on the HTTP server.

Image

I changed your code slightly: -
' Gambas class file

Export

Public Sub WebButton1_Click()

  Message("This is a message box.")

End

Public Sub WebTimer1_Timer()

  WebLabel1.Text = Format(Now, "hh:nn:ss")

End

Public Sub WebForm_Open()

  WebTimer1.Start

End
Forum tip: - Use the 'gb' button when adding code, it looks better.
Image

crevilla
Posts: 7
Joined: Thursday 30th December 2021 10:22pm

Re: Anybody having issue with web-debugging?

Post by crevilla » Saturday 30th April 2022 9:44pm

THANK YOU!

You are a life saver, and will do code button next time.
Dies ist kein Unterschrift.
Image

Post Reply