3

I was moving the Execute Anonymous window and accidentally placed it above the outer margin of the Dev Console. Now because I am no longer in the act of moving the small window I am unable to click on its title bar and move it back down because the Dev Console's header is blocking me. What should I do ? I am able to resize the anonymous window a number of ways but the only way to actually move it is by using the handlebars that appear in the title section.

enter image description here

  • 1
    Closing and reopening the developer console reset the position for me. – Avinash Jul 12 '18 at 16:45
  • 1
    Just Refresh the Dev Console and It will do the Trick :) – Amit Singh Jul 12 '18 at 16:46
  • Are you sure ? There must be better way. What I am really looking for is a hotkey combination to memorize or, possibly, a long and involved update process. – SallyRothroat Jul 12 '18 at 16:49
  • 1
    @madmax Unfortunately, once you put a window in a position like that, you can't get it back without a refresh or close/open cycle. – sfdcfox Jul 12 '18 at 18:20
5

All the Developer Console settings are stored in the IDEWorkspace records, including the positioning of any windows. So if you ever get into an irrecoverable issue with the dev console just delete those records with something like workbench or change the User.WorkspaceId to reset it.

Recovering the execute anonymous window position from an active session will require a lighter touch.

My execute anonymous window seems to consistently have the ID window-1183, but that might just be because it was the first window I opened. Anyway, with that we can force it back into viewable space with JavaScript.

document.getElementById('window-1183').style["top"] = "10px";

Taking it a step further, you could look for any x-window that is off the top of the screen.

Array.from(document.getElementsByClassName("x-window")).forEach(
    function(element, index, array) {
        var top =  parseInt(element.style["top"]);
        console.log(top);
        if(top < 0) {
            element.style["top"] = "10px";
        }
    }
);

Note that this doesn't get the corresponding x-css-shadow, but once it can be dragged again it is easy enough to correct.

2

If using Chrome [or prolly IE in its version of DevTools], these steps work:

  • F12 [DevTools]
  • click the Inspect arrow button
  • point the inspect arrow at the partially hidden Anonymous Apex window and move it around until you get the whole window highlighted -- e.g. not the side bars or the text area by themselves
  • click
  • you should see the < div > of the window with negative values for top and left -- double-click to allow edits and change them both to something small, and positive, like 50 for each
  • Press Enter to save your new position changes and watch your window move into view.
  • click that up arrow to your left here ;)
  • you're welcome, SR – CRT Apr 27 at 5:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.