Debugging in headless Chrome¶
In most cases, the results of running tests locally with Chrome’s GUI are the same as running them in the CI with headless Chrome. However, there are rare cases where headless and GUI Chrome generate different results. In this situation, you can’t use the GUI - instead, you need to debug BokehJS’ code directly in the headless browser.
The following instructions only apply to the rare cases where you actually need to debug specifically in the headless version of Chrome. In most cases, you should be able to debug BokehJS with the GUI version of Chrome. See Testing with devtools server for instructions on debugging BokehJS with the GUI version of Chrome.
Follow these steps in case you need to debug directly in the headless version of Chrome:
node test/devtools serverto start a BokehJS devtools server.
Open another console and run
node make test:run:headless. This starts Chrome in headless mode preconfigured for the BokehJS testing setup.
Open a Chrome or Chromium web browser and enter the URL
about:blanklink at the bottom of the page. You can ignore the rest of that page.
Clicking this link opens a remote devtools console. Use the navigation bar inside this console to use the endpoints you would usually use with Bokeh’s devtools server in the GUI version of the browser.
See Testing with devtools server for more information on Bokeh’s devtools server.