Chrome for Debugging Policy Modeler Interviews

When looking into an Oracle Policy Modeler Debug session, I often want to view the Interview in Google Chrome, even at an early stage. The embedded Web Browser of the Debugger being Internet Explorer-based (and for various reasons which I quite understand, not having all the Context Menu options that normal IE has), I want a quick way to get into Chrome. I need to see the CSS, the JavaScript, and all the rest. Basically give me a Browser Debug Console.

To do this requires Registry Editor work, but the result is worth the effort. Firstly, let me again make clear I am not responsible for anything you choose to do with this information – you should think before doing anything in the Registry, and make backups. The example I am giving is for Windows 10, since it seems to be the least obvious solution – certainly it took a fair bit of searching on the Internet to get this working.

Add the following Key to add the ability to call Chrome directly from a URL in Internet Explorer, so to speak. You are going to create a new protocol to add to the http:// https:// file:// res:// and so on that you can use already for links. My protocol is called Trickshot://. Doing this in Windows 10 is much harder than in previous versions since there are many more restrictions in the domain of programs, defaults and so on.

In addition, just so we understand each other, we are basically using a security issue that could, in theory, be hijacked for nefarious purposes.

Several registry keys are needed. One in the HKEY_LOCAL_MACHINE and one in HKEY_CLASSES_ROOT branch.

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Trickshot\shell\open\command]
 @="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" -- %1"

[HKEY_CLASSES_ROOT\Trickshot]
@="URL:trickshot"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\Trickshot\shell]

[HKEY_CLASSES_ROOT\Trickshot\shell\open]

[HKEY_CLASSES_ROOT\Trickshot\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" -- %1"

Obviously you would adjust the path to correspond to your system. Now if you go to Windows Run command and type “Trickshot:// google.fr” – with a space after the slashes and without the quotes, you should see Chrome open the relevant site. So now we could use this as a link in our Debugger. The link will work, but as a side effect, a window of the OPA Debugger will open, will fail to load the page (with an Unknown Protocol error) but then Chrome will start and you are looking at the Interview. You can start a new session, switch on the JavaScript Debugger of Chrome and so on.

Embed a label in your Interview (or put it somewhere, hard coded) that looks like this:

<a target="_blank" href="./" onclick="window.open('Trickshot:// ' + this.href, 'mynewwin');return false;">Go to Chrome</a>

This is just an example of course. Run the Interview with the Debug button as normal. Click your Go to Chrome link. When you click it, the Embedded Internet Explorer will fail to open it, but the registered application will take over and Chrome will load the page for you.

So the flow is something like this:

And of course, it is true, you could right click the normal Oracle Policy Modeler Debugger window, click Create Shortcut, minimize Oracle Policy Modeler, find the right Shortcut, run it in Chrome, ad eternam (so many useless icons on your Desktop!) and work like that. But I think this method is much faster and easier in the long run.

Have fun!