Backendless Support
 
Completed

save status of enabled/disabled debug events

When you use BL debug, by default all events goes through this debug and on each debug restart all events are reset to being debugged. Which is not very convenient if you have many events (in my case more than 50) and only want to debug few particular and leave others run by production shared cloud scripts. So, if there would be some option to save state and only debug certain selection of events - that would be good.

Leave a Comment

Comments (9)

photo
1

Are you talking about data service event handlers assigned to "*" ?

photo
1

In my case it's all Custom Events, but I guess it's same for all event handlers

photo
1

I see what you're saying now. That would be a rather significant change on the server.

As an alternative, I would create a separate module in IDEA for each event handler (I am not sure what IDE you use, IDEA makes it rather simple). This way you can debug each individual module independently of others.

photo
1

Hmm, I'm not quite following. I'm using Webstorm (created by same company as IDEA). Maybe it's different for Java and Javascript (I'm interested in javascript only)

photo
1

In this case I recommend using the "exclude" option in coderunner.json. You will see it already contains several entries. Simply add the paths of the event handlers you would like to exclude from debug/deployment and any remaining (not excluded) ones will be receiving the events.

photo
1

Ah, that's interesting idea, thanks!

photo
1

Actually, no.

Maybe I didn't quite understand, I haven't found exact "exclude" option, I used this

"files": [

"app/**",

"!app/handlers/custom-events/findInvItems.js"

]

and after "npm run debug" findInvItems simply wasn't accessible, it wasn't run neither from debug nor from production version

photo
1

Sorry, I was thinking you are using version 4 of CodeRunner (which works only with the 4.x backend). The "exclude" option is available there.

photo
1

ah, I see. More reasons to migrate to v4 eventually

photo