Skip to content

a simple websocket server and client for debugging react-native projects.

Notifications You must be signed in to change notification settings

asleepace/rn-debugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RN Debugger

a simple websocket server and client which can help remotely debug react-native applications.

# clone the project
git clone https://github.com/asleepace/rn-debugger.git
cd rn-debugger

# install dependencies and start server
npm install
npm run start

How to send data

Send a POST request to http://localhost:8082/debugger with the following format

const queue: string[] = []
const message = ['hello world!', 'argument1', 123, { foo: 'bar' }]

queue.push(message)

const encodedMessages = queue.map(item => JSON.stringify(item))
const encodedBody = JSON.stringify(encodedMessages)

fetch("http://localhost:8082/debugger", {
  body: encodedBody,
  method: "POST",
})

How to view data

Open http://localhost:8082 in your browser and open the chrome devtools to see the following

  • Yellow favicon means wating for connection
  • Green favicon means receiving messages
  • Red favicon means disconnected
Screenshot 2023-09-08 at 4 21 12 PM

About

a simple websocket server and client for debugging react-native projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published