mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-07 07:13:12 +00:00
1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
|
|
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[8561],{28453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>c});var o=s(96540);const t={},i=o.createContext(t);function r(e){const n=o.useContext(i);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(i.Provider,{value:n},e.children)}},99494:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"build/javascript/debug-waku-dapp","title":"Debug Your Waku DApp and WebSocket","description":"This guide provides detailed steps to enable and use debug logs to troubleshoot your Waku DApp, whether in a NodeJS or browser environment and check your WebSocket connections in nwaku.","source":"@site/docs/build/javascript/debug-waku-dapp.md","sourceDirName":"build/javascript","slug":"/build/javascript/debug-waku-dapp","permalink":"/build/javascript/debug-waku-dapp","draft":false,"unlisted":false,"editUrl":"https://github.com/waku-org/docs.waku.org/tree/develop/docs/build/javascript/debug-waku-dapp.md","tags":[],"version":"current","lastUpdatedAt":null,"frontMatter":{"title":"Debug Your Waku DApp and WebSocket","hide_table_of_contents":true,"displayed_sidebar":"build"},"sidebar":"build","previous":{"title":"Run @waku/sdk in a NodeJS Application","permalink":"/build/javascript/run-waku-nodejs"},"next":{"title":"Manage Your Filter Subscriptions","permalink":"/build/javascript/manage-filter"}}');var t=s(74848),i=s(28453);const r={title:"Debug Your Waku DApp and WebSocket",hide_table_of_contents:!0,displayed_sidebar:"build"},c=void 0,d={},l=[{value:"Enabling debug logs",id:"enabling-debug-logs",level:2},{value:"NodeJS environments",id:"nodejs-environments",level:3},{value:"Browser environments",id:"browser-environments",level:3},{value:"Checking WebSocket setup",id:"checking-websocket-setup",level:2},{value:"Try Websocat for connection",id:"try-websocat-for-connection",level:3},{value:"Check certificate validity",id:"check-certificate-validity",level:3},{value:"Check WebSocket port accessibility",id:"check-websocket-port-accessibility",level:3}];function a(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["This guide provides detailed steps to enable and use debug logs to troubleshoot your Waku DApp, whether in a NodeJS or browser environment and check your WebSocket connections in ",(0,t.jsx)(n.a,{href:"/run-node/",children:"nwaku"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"enabling-debug-logs",children:"Enabling debug logs"}),"\n",(0,t.jsxs)(n.p,{children:["When resolving issues in your Waku DApp, debug logs can be helpful. The ",(0,t.jsx)(n.code,{children:"@waku/sdk"})," and ",(0,t.jsx)(n.code,{children:"libp2p"})," packages use the debug tool to handle and show logs that help you debug effectively."]}),"\n",(0,t.jsx)(n.h3,{id:"nodejs-environments",children:"NodeJS environments"}),"\n",(0,t.jsxs)(n.p,{children:["To enable debug logs for ",(0,t.jsx)(n.code,{children:"@waku/sdk"})," on NodeJS, you must set the ",(0,t.jsx)(n.code,{children:"DEBUG"})," environment variable. To only enable debug logs for ",(0,t.jsx)(n.code,{children:"@waku/sdk"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-shell",children:"export DEBUG=waku*\n"})}),"\n",(0,t.jsxs)(n.p,{children:["To enable debug logs for both ",(0,t.jsx)(n.code,{children:"@waku/sdk"})," and ",(0,t.jsx)(n.code,{children:"libp2p"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-shell",children:"export DEBUG=waku*,libp2p*\n"})}),"\n",(0,t.jsx)(n.p,{children:"To enable debug logs for all components:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-shell",children:"export DEBUG=*\n"})}),"\n",(0,t.j
|