B4J Question Is possible to run a second, third, ... instance of B4J Ide?

amorosik

Expert
Licensed User
When I try to run a second B4J program (from second development environment) on the second ide I get this error:

B4X:
Waiting for debugger to connect...
shell switching to alternate port: 9054
shell switching to alternate port: 9055

What exactly is the problem that makes it impossible to use a second, third, fourth ... B4J development environment?
E' possibile
 

Cableguy

Expert
Licensed User
Longtime User
It comes from the debugger, it's "shared" by all opened ide instances, but it can only debug one code project at a time.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
When you have one B4J project running in debug mode and you want to run another project in another B4J IDE instance, one you need: to :
- Close the current running project, not the IDE, only the running project.
- Clean the project, with menu Tools / Clean project.
- And, then start the other project.
This works, I use it very often.
 
Upvote 0

amorosik

Expert
Licensed User
It comes from the debugger, it's "shared" by all opened ide instances, but it can only debug one code project at a time.

A, well now it's clear
And wouldn't it be possible to have two, three, .. instances of the debugger activated, used respectively by the second, third, ... instance of the B4j ide?
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Nope....

As I understand it - and have read, DEBUG runs in the MAIN thread (the same thread for all IDE processes).

BTW - what the heck is a thread? I big dummie...
I sowed my pants yesterday using a needle and thread... How does this apply to computers???

Thanks
 
Upvote 0

amorosik

Expert
Licensed User
No. No.
It is actually not too complicated to solve this issue. The problem is that the IDE + debugger processes expect two specific ports.

How to run two or more B4J instances even in debug mode?
Can I create three different installations of the B4J ide, and assign different ports to each of them?
 
Upvote 0

Diceman

Active Member
Licensed User

I used to be able to run two B4J apps in debug mode 2 years ago when I was running jRDC2 server in one IDE (debug mode) and another IDE running jRDC2 client also in debug mode. I could set up break points in either app and they would stop at the breakpoint. I would have to be quick on the server because the client app would timeout after a minute or so. Yes I know it is suppose to be impossible but no one told me it was impossible so I did it anyway. ?

It is quite simple. I'd get the server running first, then I would have to compile it once and run the client app 3 times before it would run (using F5). The first 2 attempts would fail to run saying it can't connect to the debugger, but would almost always run on the 3rd attempt without any problem. Had I known it was impossible I wouldn't have attempted it. Sorry.

Hope this helps.
 
Upvote 0

AHilton

Active Member
Licensed User
Longtime User
Diceman beat me to it. I've been doing that continually for several years now. It really is terribly un-productive, but it works. I'm doing it right now, in fact. I'll frequently have 2 B4J and a B4A, B4I or B4R running (not just editing) at the same time. There's been several bug reports / wish list posts about this for years.

My specific use-case for this is developing a Non-UI server and a UI Client app at the same time. I can edit server and/or client at the same time, save and continue on. BUT, there are certain things you can't do ... like adding a new sub or new class, etc. You'll have to stop that B4J IDE and (maybe) have to go through that frustration "3 runs" to get the second one going again. Very wasteful of time.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…