How can I test a trigger function in GAS?

You can write a test function that passes a simulated event to your trigger function. Here’s an example that tests an onEdit() trigger function. It passes an event object with all the information described for “Spreadsheet Edit Events” in Understanding Events. To use it, set your breakpoint in your target onEdit function, select function test_onEdit … Read more

How to use pg_stat_activity?

See this closely related answer for question “Postgres Query execution time”. pg_stat_activity is a view in the pg_catalog schema. You can query it by SELECTing from it like any other table, e.g. SELECT * FROM pg_stat_activity. The manual page you linked to explains its columns. You’ll sometimes find yourself wanting to join on other tables … Read more

How is Linux kernel live debugging done and what tools are used?

Another option is to use an ICE or JTAG controller, and GDB. This ‘hardware’ solution is especially used with embedded systems. But for instance QEMU offers similar features: start QEMU with a GDB ‘remote’ stub which listens on ‘localhost:1234’ : qemu -s …, then with GDB, you open the kernel file vmlinux compiled with debug … Read more

What is “initiator other” in network in chrome console?

“Initiator Other” usually means the network request was made from a user, not from Chrome, a redirect or a script. The request was fired when someone clicked a button (this is what your analytics is probably tracking). You can read more about this in the Chrome DevTools docs. Initiator: The object or process that initiated … Read more

VS2008: Unable to start debugging, Remote Debugging Monitor has been closed

If you are on a 64bit OS then you are ‘silently’ remote debugging. Devenv runs in WoW64 (meaning it’s a 32bit process) … when you hit F5 is launchs msvsmon.exe as a 64 bit process and sets up a communication channel between devenv and msvsmon “silent remote debugging” to allow debugging your 64 bit process. … Read more

`po` gives `error: :1:1: error: use of unresolved identifier`

So it turns out there was probably a bug in the past that when you were adding a Swift file it would add/ask a Bridging header, but it wouldn’t add that line to your project SWIFT_OPTIMIZATION_LEVEL = “-Onone”; which means you’d stay in this state resulting in error: <EXPR>:1:1: error: use of unresolved identifier! I … Read more