How to hide "Browser" menu while debugging a script?

How to hide "Browser" menu while debugging a script?

jphalip
Enthusiast Enthusiast
496 Views
5 Replies
Message 1 of 6

How to hide "Browser" menu while debugging a script?

jphalip
Enthusiast
Enthusiast

Hi,

 

While stepping through a debugging session in VS Code, the Fusion 360 "Browser" menu remains on foreground of the screen even though the rest of the Fusion 360 is in the background. Is there a way to hide that menu entirely?

 

2023-02-12_09-05-51.png

 

Thanks,

 

Julien

0 Likes
497 Views
5 Replies
Replies (5)
Message 2 of 6

Jorge_Jaramillo
Collaborator
Collaborator

The Browser menu could be hidden with Ctrl-Alt-B or File Menu -> View -> Hide Browser.

Is it what you're looking for?

 

Hope this could help you.

 

Best regards,

Jorge Jaramillo

0 Likes
Message 3 of 6

jphalip
Enthusiast
Enthusiast

Thanks Jorge. Ideally I'd like the browser menu to stay on while I'm using the Fusion 360 UI, but disappear (like the rest of the UI) while I'm debugging a script in VS Code. Is that possible?

0 Likes
Message 4 of 6

kandennti
Mentor
Mentor

Hi @jphalip .

 

There may be a better way, but we have created a sample that uses text commands to show/hide.

# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.fusion as fusion

def run(context):
    ui = core.UserInterface.cast(None)
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface

        app.executeTextCommand(u'Commands.Start HideBrowserCommand')
        ui.messageBox('Hide Browser')

        app.executeTextCommand(u'Commands.Start ShowBrowserCommand')
        ui.messageBox('Show Browser')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
0 Likes
Message 5 of 6

jphalip
Enthusiast
Enthusiast

Thank you, that's pretty clever. My only issue with it is that it's embedded in the script itself, which may not be the behavior that regular users would want. This is an issue that really only occurs during development/debugging. But I could just use that trick during development and then remove it.

0 Likes
Message 6 of 6

kandennti
Mentor
Mentor

@jphalip .

 

I didn't know what to use to determine that the script was running normally and that it was running in debugging.

I also didn't understand why there was a problem with the browser tree being displayed during debugging.

0 Likes