1. A method, comprising: determining a capability of a virtual machine (VM) configured to execute a host application in a runtime environment; instrumenting a function in user script code developed for execution in the host application with a guard based upon the capability of the VM, the instrumenting comprising at least one of: instrumenting the function with the guard at a location in the user script code, the location determined based upon the capability of the VM; or instrumenting the function with a number of guards determined based upon the capability of the VM, the number of guards comprising the guard; executing the user script code in the runtime environment; and responsive to detecting an explicit debugging gesture using the guard, transforming the function to generate debuggable script code.