Debug connection to Sketchup in macOS 15.6.1 on a random port

I've been successfully connecting to SketchUp for debugging an extension, but now it does briefly connect but on a random port so the connection fails. Quite sure all the other settings haven't changed.

Server command: rdebug-ide --host 0.0.0.0 --port 6162 --dispatcher-port 26162 -- $COMMAND$ 

here is the lsof info from the brief time it is connected.

Any idea what's going on?

0
5 comments

Forgot to mention I'm on the latest RubyMine: Build #RM-252.25557.135, built on August 28, 2025

0

First check basics: is SketchUp actually listening where you expect? Then check macOS firewall and permissions. Try these quick steps:

  1. Confirm listening ports (shows apps + ports):
    sudo lsof -iTCP -sTCP:LISTEN -n -P
    or to check a specific port: sudo lsof -i :<PORT>
  2. Test connectivity to the port locally:
    nc -vz localhost <PORT>
    (or telnet localhost <PORT>)
  3. Inspect macOS firewall / app permissions:
    System Settings → Network → Firewall (or use sudo /usr/libexec/ApplicationFirewall/socketfilterfw --listapps) — make sure SketchUp is allowed.
  4. Check SketchUp logs and macOS Console.app for errors when SketchUp opens the port (Console → search “SketchUp” or the process name).
  5. If the port is random/unreliable, see whether SketchUp has a config to set a fixed port (or a CLI/startup option). If not, consider adding a local port-forward (e.g., ssh -L) from a stable port to the random port while debugging.
  6. Verify no other service is colliding on the port (use sudo lsof -iTCP:<PORT> -sTCP:LISTEN).
  7. If remote devices can’t reach it, check local router/NAT and any VPN—also open/forward the port there. Temporarily disable firewall to test if that’s the blocker.
  8. If you need deeper tracing, use sudo tcpdump -i lo0 port <PORT> while reproducing the issue to see packets. 
    Visit https://intellij-support.jetbrains.com/hc/en-us/community/posts/29191920876050-Debug-connection-to-Sketchup-learn more-in-macOS-15-6-1-on-a-random-port?page=1#community_comment_29565404495762
0

Adam Smith As123321  - I was able to resolve this by removing all the breakpoints in RubyMine and restarting [RubyMine]. I had done some git mv on a directory and the breakoint may have been referencing something that didn't exist any more. This seemed to work. SketchUp launches on clicking the debug icon, the connection gets established. It's been good ever since.

0

Hi, thanks for sharing this. A few ideas that might help pin down what’s happening:

  • Double-check with lsof or similar tools whether SketchUp is actually listening on the port you set (e.g. 6162) when you try the debug.
  • The macOS firewall or app permissions sometimes block these incoming connections (even on loopback). Make sure SketchUp & RubyMine have permission.
  • I noticed in another post someone had resolve a similar issue by removing all breakpoints and restarting RubyMine, there may have been a stale breakpoint referencing a file that no longer exists. IntelliJ Support

And here’s a related topic from the same forum that might also be useful: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000553444-Debugging-with-company lets-remote-interpreter-behind-a-firewall
 

 

0

Adam Smith As123321  Thank you for the detailed list of localhost checking! Here is the lsof output: rubymine on 26162 and SketchUp on 6162 .. as it should be.

0

Please sign in to leave a comment.