How to connect debugger to Mendix applications on Cloud Foundry

1
I have a Mendix app with Mindsphere integration. This app has been deployed to MindSphere using Cloud Foundry. How can I connect the Mendix debugger to this app? Does anyone know?
asked
4 answers
1
cf set-env $MYAPP DEBUGGER_PASSWORD $averystrongpassword

cf restart $MYAPP

After that connect your modeler to https://myapp…/debugger/  with the password you have set above

For more details: https://github.com/mendix/cf-mendix-buildpack#enabling-the-mendix-debugger 

answered
0

Thank you @Xiwen for your input. In the meantime a colleague of mine also pointed me in the direction of this page. Nonetheless, I don’t get it working. When I try this, I get:

System.Net.WebException: The remote server returned an error: (403) Forbidden.
   at System.Net.HttpWebRequest.GetResponse()
   at Mendix.Modeler.Microflows.Debugger.DebuggerClient.DoHttpRequest(String url, SecureString password, String userAgent, String json, Int32 timeout) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Microflows\Debugger\DebuggerClient.cs:line 195
   at Mendix.Modeler.Microflows.Debugger.DebuggerClient.PerformRequest(DebuggerRequest request, Int32 timeout) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Microflows\Debugger\DebuggerClient.cs:line 161
   at Mendix.Modeler.Microflows.Debugger.DebuggerClient.StartSession(IEnumerable`1 breakpoints) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Microflows\Debugger\DebuggerClient.cs:line 57
   at Mendix.Modeler.Microflows.Debugger.DebuggerController.StartDebugging(String url, SecureString password, ConnectionMode mode) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Core\Microflows\Debugger\DebuggerController.cs:line 88
   at Mendix.Modeler.Utility.BackgroundUtil.<>c__DisplayClass1_0`1.<Do>b__0(Object s, DoWorkEventArgs e) in C:\Users\Autobuild\workspace\AppStudio4.0-Build\modeler\Mendix.Modeler.Utility\BackgroundUtil.cs:line 29
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

 

answered
0

Yes, I did restart.

Also, here is what I find in the log with respect to the debugger. It says that the debugger should be enabled!

2021-03-10T07:11:10.05+0100 [APP/PROC/WEB/0] OUT INFO - MicroflowDebugger: Enabled debugger.
2021-03-10T07:11:10.05+0100 [APP/PROC/WEB/0] OUT INFO: The remote debugger is now enabled with the value from environment variable DEBUGGER_PASSWORD.
2021-03-10T07:11:10.05+0100 [APP/PROC/WEB/0] OUT INFO: You can use the remote debugger option in the Mendix Business Modeler to connect to the /debugger/ sub url on your application (e.g. https://app.example.com/debugger/).

 

answered
0

Extra piece of information… When I enter the debugger URL in my browser, I get an empty object in return: {}

At that point in time, in the cf logs I see:

2021-03-10T13:07:29.44+0100 [APP/PROC/WEB/0] OUT INFO - MicroflowDebugger: Unauthorized debugger request from [Source-IP: 127.0.0.1, X-Forwarded-For: 31.161.145.214, 31.161.145.214, 18.195.251.204, 18.195.251.204, 172.16.102.42, 172.16.102.244, User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36].
   2021-03-10T13:07:29.44+0100 [RTR/3] OUT mendix-mindsphere-mvp.apps.eu1.mindsphere.io - [2021-03-10T12:07:29.440641246Z] "GET /debugger/ HTTP/1.1" 401 0 2 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ...

 

answered