I\'m building an app using Crossbar.io in IntelliJ. Since you start the app using the crossbar start
command in the shell I\'m not clear on how to (ideally automati
Nice question.
I was a little bit confused about how to debug as well because it seems like crossbar is sort of mixing up python 2 and 3 together. I wanted to install crossbar.io under a virtual environment with Python 3 because the examples components are using python 3 but for some reason I could not manage to install crossbar under a virtual environment with Python 3 and Im forced to use Python 2 for WAMP routing instead. I normally use pyenv rather than virtualenv, however, I believe they both are similar. I ended up creating 2 pyenvs. One with Python 2.7.6 purely for crossbario router and the other with Python 3.4.2 for App Components.
Have a look at the Screenshot
I don't know if it is the best way to solve this problem but this is what I did. I used PyCharm but I believe IntelliJ is similar as well.
I haven't tried this under virtualenv but I reckon it is quite similar.
Install python 2.7.6 via pyenv
$ pyenv install 2.7.6
Create a pyenv with Python 2 for crossbar.io
$ pyenv virtualenv 2.7.6 crossbar $ pyenv activate crossbar (crossbar)$ pip install crossbar
Find and copy the full path for crossbar executable you have just installed.
(crossbar)$ which crossbar
and copy the path.
Install python 3.4.2 via pyenv
$ pyenv install 3.4.2
Create a pyenv with Python 3 for app components
$ pyenv virtualenv 3.4.2 app $ pyenv activate app (app)$ pip install autobahn
Create a normal PyCharm project with "app" as a local python environment. I mean use python executable from app pyenv as an interpreter.
Generate a hello world crossbar.io app.
$ pyenv activate crossbar (crossbar)$ crossbar init --template hello:python
From menubar go to Run/Edit configuration...
~/.pyenv/versions/crossbar/bin/crossbar