sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    SketchUp Debugging for Notepad++

    Scheduled Pinned Locked Moved Developers' Forum
    22 Posts 6 Posters 3.4k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      Jim
      last edited by

      I've been playing with this Notepad++ plugin for a few weeks, and I want to get something released so you can give it a test run.

      The easiest way to try is to download this (no install) .zip which contains a portable version of Notepad++, PythonScript, and everything else you need to try it.

      When you unzip the file, you can start SketchUp and Notepad++ using the Shortcuts provided. Be sure to install the debugger .dll first if you have not already done so.

      There are some quick instructions on the Github repo. I know it's a little short on documentation, but it should not be too hard to figure out. The problem is I don't really use Notepad++, don't know Python well enough yet to do it better, and have already spent too much time on it.

      So hopefully people can provide feedback and code improvements either here or through Github.

      Let me know if you have any trouble.

      A short video: https://www.youtube.com/watch?v=PoJkW-CKzHk

      Download
      npp-sudb-0.2.zip

      Hi

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        I have not tried your latest because you've included NPP and PythonScript, and I have BOTH of them at latest version already installed.

        This means I'll have to cherry-pick your repo and manually copy files over to my machine.
        Because you also have a non-standard install, it is not likely forking your repo will do me any good.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          The PythonScript was one I compiled from the latest source so I could use a margin click to set/del breakpoints.

          The repo has been changing rapidly, and destructively. It now contains just the debugger plugin and closely related files. I hope this will be the final layout of the repo.

          The files in the .zip are all stand-alone and don't require installation. Just unzip and go. They won't interfere with your installed versions. Only the SURubyDebugger.dll needs copied to SketchUp's root folder, but there is a script included to help with that.

          I felt this was an easier way to let people try this early version without needing a complicated and confusing installation of all the software required.

          Hi

          1 Reply Last reply Reply Quote 0
          • jolranJ Offline
            jolran
            last edited by

            This only works with Sketchup 2014/ Ruby 2, right ?

            I havent followed along the Ruby 2 activities 😞

            1 Reply Last reply Reply Quote 0
            • J Offline
              Jim
              last edited by

              @jolran said:

              This only works with Sketchup 2014/ Ruby 2, right ?

              Correct.

              Hi

              1 Reply Last reply Reply Quote 0
              • jolranJ Offline
                jolran
                last edited by

                Ok, thanks.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jim
                  last edited by

                  Updated the .zip to v0.2

                  • Added a new margin for Breakpoints. Simply click on margin to add/remove breakpoints. (Breakpoints are represented as a red arrow.)

                  2014-05_57.png

                  • Updated toolbar (Tooltips are not supported, unfortunately.)

                  2014-05_56.png

                  • Added better exception handling and messages.

                  Hi

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Jim
                    last edited by

                    No interest?

                    Hi

                    1 Reply Last reply Reply Quote 0
                    • jiminy-billy-bobJ Offline
                      jiminy-billy-bob
                      last edited by

                      Sure there is!
                      I've not had time to use it, but it seems promising 😉

                      25% off Skatter for SketchUcation Premium Members

                      1 Reply Last reply Reply Quote 0
                      • jolranJ Offline
                        jolran
                        last edited by

                        ditto.

                        1 Reply Last reply Reply Quote 0
                        • W Offline
                          woodshop
                          last edited by

                          does the plugin work for SU 2015?

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            Jim
                            last edited by

                            @woodshop said:

                            does the plugin work for SU 2015?

                            The plugin is for the editor Notepad++. The SketchUp Ruby Debugger works with SketchUp 15, so yes you should be able to connect Notepad++ to the SketchUp debug server.

                            Hi

                            1 Reply Last reply Reply Quote 0
                            • Y Offline
                              ying2014
                              last edited by

                              I have a question,the notepad++ v6.6.2.is old ,how can I use the script for my notepad

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                Jim
                                last edited by

                                @ying2014 said:

                                I have a question,the notepad++ v6.6.2.is old ,how can I use the script for my notepad

                                Hi Ying,

                                I haven't tried it in years. This was more a proof-of-concept than a finished plugin. I was disappointed with the poor integration of the plugin with the Notepad++ user interface. The plugin is written in Python and uses the PythonScript plugin for Notepad++.

                                I have just now been trying to get this to work on version 6.9.1 but so far have not had success getting Python Script to work.

                                Hi

                                1 Reply Last reply Reply Quote 0
                                • Y Offline
                                  ying2014
                                  last edited by

                                  Hi Jim, Thanks for your answer,I'm looking forward to it can succeed.

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    Jim
                                    last edited by

                                    You can try it by downloading this file.

                                    Extract the .zip and start Notepad++ by clicking the notepad++.exe file inside.

                                    Open a Ruby extension to debug. Press F5 to start SketchUp in Debug mode.

                                    Press the SketchUp Icon in the toolbar - this will start SketchUp and add a new margin in the editor - click on the margin to set breakpoints.

                                    Hi

                                    1 Reply Last reply Reply Quote 0
                                    • Y Offline
                                      ying2014
                                      last edited by

                                      hello.jim,it can't work well
                                      Connecting to SketchUp..
                                      Traceback (most recent call last):
                                      File "plugins\Config\PythonScript\scripts\SketchUp\init.py", line 2, in <module>
                                      sudb.init()
                                      File "C:\Users\zyq\Downloads\npp-6.9.1+skpdbg\plugins\Config\PythonScript\scripts\sudb.py", line 100, in init
                                      connect()
                                      File "C:\Users\zyq\Downloads\npp-6.9.1+skpdbg\plugins\Config\PythonScript\scripts\sudb.py", line 111, in connect
                                      except socket.error (value, message):
                                      NameError: global name 'value' is not defined
                                      sending: v l
                                      Traceback (most recent call last):
                                      File "plugins\Config\PythonScript\scripts\SketchUp\local-vars.py", line 2, in <module>
                                      sudb.local_vars()
                                      File "C:\Users\zyq\Downloads\npp-6.9.1+skpdbg\plugins\Config\PythonScript\scripts\sudb.py", line 327, in local_vars
                                      send("v l")
                                      File "C:\Users\zyq\Downloads\npp-6.9.1+skpdbg\plugins\Config\PythonScript\scripts\sudb.py", line 160, in send
                                      sock.send(msg)
                                      socket.error: [Errno 10057] ԉԚ͗ޓؖûԐlޓҢȒ(ձʹԃһٶ sendto ַԃע̍˽ߝѨ͗ޓؖʱ)

                                      1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        Jim
                                        last edited by

                                        It looks like SketchUp is not running the debug server. Start SketchUp from Notepad++ by pressing the F5 key. This launches SketchUp using this command line:

                                        Sketchup.exe -rdebug "ide port=1234"

                                        If you need to change which version of SketchUp, or the location of SketchUp then edit the "shortcuts.xml" file in the NPP folder.

                                        SketchUp must be started with the debug server enabled before pressing the SketchUp icon from the editor.

                                        Again, this debugger is never going to work well because of limitations in PythonScript for Notepad++ and in the SketchUp debug server.

                                        I have tried to fix your error. Extract the file "sudb.py" and replace it in the "plugins\Config\PythonScript\scripts" folder.


                                        sudb.zip

                                        Hi

                                        1 Reply Last reply Reply Quote 0
                                        • Y Offline
                                          ying2014
                                          last edited by

                                          Sorry,it don't work:

                                          Connecting to SketchUp..
                                          socket error: [Errno 10061]
                                          Could not connect to SketchUp.

                                          1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            Jim
                                            last edited by

                                            Here is a link to Windows socket errors.

                                            @unknownuser said:

                                            10061 Connection refused.

                                            No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.
                                            

                                            How are you starting SketchUp?

                                            Hi

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement