
See more here.) The central part contains any opened script like a classic IDE. If the app is deployed on shinyapps.io, all scripts are located in a folder starting by _w_, which corresponds to the shinyapps.io workerId (This is a detail and not important to understand.

On the left side, you can navigate through all files accessible by the web server, that is Shiny internal resources, Shiny external dependencies (like Bootstrap 3), as well as your own scripts. Sounds good, doesn’t it?įIGURE 10.7: Inspect the source causing the error. As expected and shown in Figure 10.6, the console displays anĮrror message: Uncaught TypeError: Cannot read property 'show' of undefined.Click on the action button (I am pretty sure you clicked before step 2 )).We deliberately made some typos, the goal being to find and fix them. In the following, we consider a very simple Shiny app deployed on shinyapps.io, where a notification is displayed with JavaScript as soon as a user clicks the action button. For instance, the Framework7 HTML template, which shinyMobile is built on ( Granjon, Perrier, and Rudolf 2021), has source maps but the size would exceed 5MB, which is obviously too big to include in the R package. In practice, most R packages bundling HTML templates do not ship these files since they could be quite large (> 1.5MB), and CRAN restricts the package size to 5MB. If you have minified files, there should be source maps, which will allow reconstructing the original scripts, that is as they were before the minification process.

To debug Shiny apps from the inspector, all your scripts have to be in a folder accessible by the app like the www/ folder or by using addResourcePath().
Shiny runjs jquery example code#
In JavaScript, there are already predefined objects to interact with arrays, dates, …ġ0.6.2 Debug Shiny/JS code with the inspector We use this to refer to the object itself.
