Represents a debug message the user might want to print out for logging while debugging or whatnot. These will always come by way of the 'error' channel on streams or other event emitters. It's completely fine to ignore them, as some will just be verbose logging info, but they may help figure out what's going wrong. Support may also ask you to catch these channels, which you can do like so:
These values are _not_ guaranteed to remain stable, even within a major version, so don't depend on them for your program logic. Debug outputs may be added or removed at any time, without warning.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class DebugMessage (4.8.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.8.0 (latest)](/nodejs/docs/reference/pubsub/latest/pubsub/debugmessage)\n- [4.4.0](/nodejs/docs/reference/pubsub/4.4.0/pubsub/debugmessage)\n- [4.3.3](/nodejs/docs/reference/pubsub/4.3.3/pubsub/debugmessage)\n- [4.1.1](/nodejs/docs/reference/pubsub/4.1.1/pubsub/debugmessage)\n- [4.0.7](/nodejs/docs/reference/pubsub/4.0.7/pubsub/debugmessage)\n- [3.7.5](/nodejs/docs/reference/pubsub/3.7.5/pubsub/debugmessage)\n- [3.2.1](/nodejs/docs/reference/pubsub/3.2.1/pubsub/debugmessage)\n- [3.1.1](/nodejs/docs/reference/pubsub/3.1.1/pubsub/debugmessage)\n- [3.0.3](/nodejs/docs/reference/pubsub/3.0.3/pubsub/debugmessage)\n- [2.18.3](/nodejs/docs/reference/pubsub/2.18.3/pubsub/debugmessage)\n- [2.17.0](/nodejs/docs/reference/pubsub/2.17.0/pubsub/debugmessage)\n- [2.16.6](/nodejs/docs/reference/pubsub/2.16.6/pubsub/debugmessage)\n- [2.13.0](/nodejs/docs/reference/pubsub/2.13.0/pubsub/debugmessage) \nRepresents a debug message the user might want to print out for logging while debugging or whatnot. These will always come by way of the 'error' channel on streams or other event emitters. It's completely fine to ignore them, as some will just be verbose logging info, but they may help figure out what's going wrong. Support may also ask you to catch these channels, which you can do like so: \n\n subscription.on('debug', msg =\u003e console.log(msg.message));\n\nThese values are _not_ guaranteed to remain stable, even within a major version, so don't depend on them for your program logic. Debug outputs may be added or removed at any time, without warning.\n\nPackage\n-------\n\n[@google-cloud/pubsub](../overview.html)\n\nConstructors\n------------\n\n### (constructor)(message, error)\n\n constructor(message: string, error?: Error | undefined);\n\nConstructs a new instance of the `DebugMessage` class\n\nProperties\n----------\n\n### error\n\n error?: Error | undefined;\n\n### message\n\n message: string;"]]